I hope this message finds you well. I am currently working on the implementation of an affiliate tracking system for my webshop and find myself in need of some guidance ( have searched in the forum and on the internet, with no success.
Below is the instruction i am trying to implement, which i hope you could help me with.
Step 1: Store Parameters in a Cookie When a Visitor Clicks an Affiliate Link:
When a visitor clicks on an affiliate link, they will be redirected to your webshop.
I’m not sure how @NigelG solution would work as this is a url parameter and not a input on a form that Bubble would then save for the user.
If that doesn’t work, you can create cookies if you’d like, and then when a user signs up, read from the cookie (if one exists) and store it somewhere (prob in a separate table from the user as there is no need to bloat the user table), and that way you have a built-in date (created date of record) for when the cookie was created. Then whenever a order is made locate a cookie record for user and if it exists send the API post per instructions.
To set a cookie, I’d use GTM as it’s reliable and easier to test the Bubble and GA can give you feedback about how many visitors have such a cookie and if something goes wrong.
Easiest and most reliable affiliate route that saves a lot of tech time to build is a tapfiliate integration. Typically my preference but it incurs a monthly cost to use.
However, I detailed how to do it natively.
I’m pretty sure you got the bulk of it down but maybe there’s some info here that will help.
If you have specific questions on what you get stuck on drop them below and I’ll answer.
Let’s say a user doesn’t sign up on their first visit? How can the URL parameter be preserved? (especially if there are subsequent parameters and priority goes to the original parameters [if that’s the case])?
Just save the parameter to a cookie if the cookie is empty…
Keith has a good explanation of a slightly different method.
Of course. The affiliate program will provide you with an affiliate ID when you create a new affiliate (I know Rewardful allows you to set an affiliate ID). Save the affiliate ID to the affiliate User (I normally put Affiliate stuff in Current User’s Affiliate where affiliate is a new data type).
When a new user arrives using the affiliate link, save the affiliate/referral ID to a cookie, and when they sign up save it to the user.
Exactly as I said (except not storing it on user).
Keith’s approach seems overkill as specs here call for 2 simple parameters so to create a new record so you only have to store one parameter in a cookie is unnecessary.
Thank you very much for all your support, i really appreciate it.
This is what i have built so far:
Step 1: Cookies is created by getting the parameters from user URL.
Step 2: When user signs up, bubble read cookie if any and trigger a API connecter plugin with dynamic parameters.
But i am currently facing a challenge when trying to use dynamic references such as Cookie Value as a dynamic paramters for the API connector plugin. When i put in a static text it gets included in the POST URL but when it is a a reference it does not include, it basically blank paramter.
I will attach some screenshot to help understand the challenge.
Let me know if you see some issues with my current solution.