Capture referral/affiliate info on the URL for donations #6517
-
I am trying to be able to track where donations are coming from, for example different sources, campaigns or people. We have various membership levels we just need to know what is driving them. Possibly use hidden fields add the URL code, URL code to invoice number or maybe Active Campaign. I tried creating a hidden field called "referral" on the form then using the below snippet but I have something wrong with the snippet. add_action( 'give_donation_form_after_submit', function() { ?> |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey @yoked2000. I would agree with your direction of populating a hidden field. Looking at the script, you may need to manually trigger a change event - I'm not sure of jQuery does that when changing the |
Beta Was this translation helpful? Give feedback.
-
@yoked2000 looking through our feedback channel, it looks like we are already capturing the URL from which the donation form was loaded. The referrer URL is stored as donation meta. The catch is that it isn't displayed anywhere. Here is a snippet for displaying the referrer URL for a donation, see https://feedback.givewp.com/feature-requests/p/show-current-page-in-donation-meta. This also means that previous donations should already have this value captured 😎 |
Beta Was this translation helpful? Give feedback.
@yoked2000 looking through our feedback channel, it looks like we are already capturing the URL from which the donation form was loaded. The referrer URL is stored as donation meta. The catch is that it isn't displayed anywhere. Here is a snippet for displaying the referrer URL for a donation, see https://feedback.givewp.com/feature-requests/p/show-current-page-in-donation-meta.
This also means that previous donations should already have this value captured 😎