Outbound Link Tracking

Is anyone using a 3rd party solution to track outbound links that integrates well with Bubble? I’m exploring options, but it seems that Google Analytics requires me to add or modify the ‘onlick’ attribute of my links in html; Mixpanel event can’t be attached to links since links can’t be accessed in workflows – also apparently even it could, such a Mixpanel action would really slow down the page; Clicky requires its tracking code to be added to the site footer html files, which appears inaccessible.

Is anyone tracking outbound links in their app and if so, how?

Thanks,
RG

Can you share an example of how you’d like to use the link analytic data? Might help me narrow down to a few options. Are you wanting a plug and play solution or willing to get your hands dirty with code?

Hello, I’m looking to track/record many of the links that connect to external sites from my app. Specifically to track how many users clicked a link taking them to X site/page within various time intervals (per hour, day, per month). If the analytics solution can somehow offer cookie tracking, all the better, but this may be too complicated.

I’m really looking for an out-the-box solution but I can alter code if needed. However, I’m concerned about modifying or even accessing the app code, given Bubble’s (wonderful) no-code set-up. Really, I’d prefer a no code solution.

Thanks,
RG

1 Like

This seems to me the best option for you. What’s stopping you from adding dynamic content to an onclick event or appended to the href?

If not that, it doesn’t seem far fetched to create a homebrew solution: you need a page in your app with workflows that redirect upon page load. A custom workflow event triggered on page load should be plenty to get you started (ie http://yourapp.com/redirect?url={dynamic_text that is url encoded)&var2={xyz}&var3={abc}

This is exactly what Facebook and Twitter do at scale for all outbound links. They track everything with this method. You could technically set cookies as well using custom HTML/Javascript elements on your redirect page.

1 Like

Thank you for your thoughts on this. The homebrew solution is interesting.

Re: Google Analytics:

From Google’s documentation, after adding their script to a page to track outbound links, one must also:

…add (or modify) the onclick attribute to your links. Use this example as a model for your own links:

a href=“http://www.example.com” onclick=“trackOutboundLink(‘http://www.example.com’); return false;”>Check out example.com /a

Other than the html header, I don’t see how to access and modify the page’s code, such as the href or onclick attributes on a link tag?

Is this at all relevant to your situation? http://www.lunametrics.com/blog/2014/06/11/campaign-tracking-dynamic-source/

A bit old but still applicable I believe.

@philip, Thanks for your reply. This article doesn’t quite fit my need but it set me down the path of exploring Google Tag Manager. I’m experimenting with it now. The current issue with GTM is that it requires a code snippet inserted very close to the opening HTML body tag of a page. This messes with some of my page layouts but GTM looks promising.

RG