I’m using “This URL” to store the referral source in a running field.
It works but it gives me numerous double or triple repeated sources. Anyone out there use this successfully? ![]()
Why not make that field a list of texts and use the “add” operator to keep adding new sources?
Bubble lists don’t allow duplicate values by default, so if the URL is already in the list, Bubble will simply ignore it.
For example, create a field called Sources as a list of texts, then in your workflow use:
Make changes to Thing → Sources add New URL
If New URL is already in Sources, it won’t be added again. If it’s a new URL, Bubble will simply append it to the list.
That’s an interesting idea, thanks.
That won’t work for me as I want to track how many come from a single source, so I actually want to maintain repeated sources from different times.
However, it appears to be reporting duplicates at the same time. I could be wrong, but I can’t imagine it’s getting several clicks at the same minute, such as below. Maybe it’s correct, just find it hard to believe. ![]()
I think the current implementation needs some refinement.
One thing that stands out is the conditionals for Tom and Dave. What is real use case? Do you want to track referral for a specific user profile page or for the current user?
If doing this properly, don’t use conditions as you have for Dave or tom, use one setup for every user. Then, don’t use ‘this url’ use url parameters to find the value of importance.
Also if doing it for current user, remember Bubble cookies only last 72 hours. If a not logged in user is referred and they do not register within 72 hour cookie period the referral data you store is worthless since it will not be related to the user.
What exactly are you trying to achieve for your referral system? I’ve setup referral systems before without issues.
Hi Boston,
Tom and Dave are my own admin accounts, for dev. and live versions. I use them to record the referrals to the home page. So when I log in as Dave I can see all the sources, no other user can see. I’m tracking the UTM source when I send links in email, or in an article published (e.g. …/?=ei)…, so I can track where the source comes from.
Since the referral source comes from some link somewhere, of course there is no “user button” as mascarina suggested above. Since there is no user, the page load workflow records This URL in Dave’s field.
So, it works for what I’m trying to do, just getting what appears to be these duplicates. Does that make sense?
![]()
Yes makes sense. Remove 3 of the 4 actions you run on page load and keep only one that has no conditional. You’ll stop getting 4 of same then. Currently your set up runs four times because your conditionals are set on current user emails. You only need one as your live and dev database and apps are wholly separate from each other. Just use one action to record the url on page load and you’ll have just one record created for the url.
Have you tried running it with the debugger enabled to see what’s causing those duplicates?