Learn business growth with Google Analytics 4 Forums Google Analytics 4 Improving JavaScript Link Decoration for Cross-Domain Measurement on Unbounced Landing Pages

  • Improving JavaScript Link Decoration for Cross-Domain Measurement on Unbounced Landing Pages

    Posted by Morgan on 3 September 2022 at 9:35 pm

    “Hey everyone, I’m having a bit of a pickle with my website landing pages. I’m using a service called Unbounced and I’ve noticed that they wrap the CTA buttons on my pages. The issue is that it makes the CTA button first go to an internal link, then redirects it to the final external link where I need it to go.

    The problem here is Google’s Cross-domain Measurement. It decorates outbound clicks to specified domains with an ‘_gl’ parameter. But since the link is first redirecting internally, it loses the decoration when it ultimately redirects externally. Instead of the link ending up with my desired URL (example), it ends up as a simple URL without the ‘_gl’ parameter (example).

    I found a couple of scripts online that I toyed around with, hoping they could fix this. But it’s possible they were intended for form submissions and not button clicks? I’m not well-versed in JavaScript, so I’m not sure if they’re applicable here.

    I tried these codes (Example codes), but they weren’t functional in my case. I’m really stuck here, so any help would be greatly appreciated!

    P.S. if you’re interested, here’s a link to one of the landing pages: (landing page).”

    Sebastian replied 11 months, 1 week ago 3 Members · 2 Replies
  • 2 Replies
  • Madison

    9 October 2022 at 1:14 pm

    It seems like you’re encountering an issue with Unbounce’s call-to-action (CTA) button which is using an internal redirect before directing to the final external link. This is causing you to lose the ‘_gl’ parameter which is added by Google’s Cross-domain Measurement for tracking purposes.

    While you’ve tried using JavaScript scripts found online, they appear to not be working. That could be because they are designed for form submissions, not for button clicks as you suspected.

    I would recommend contacting Unbounce’s customer service directly for assistance, as they are likely best suited to help you solve this issue.

    Also, it might be beneficial to seek help from a professional or forum who is familiar with JavaScript, Google’s Cross-domain Measurement, and Unbounce. They would likely be able to find a solution that incorporates all these elements.

    Hope that helps!

  • Sebastian

    21 December 2022 at 1:40 am

    Your problem seems to be the redirect losing Google’s “_gl” parameter. The scripts you’re trying may not work, as they could be intended for forms rather than button clicks. Your unfamiliarity with JavaScript could also be a factor. Since Unbounced wraps your CTA buttons leading to an internal link before redirecting to the final link, this could be why the parameter is getting lost. Without a more thorough understanding of how Unbounced operates and how your specific landing pages are set up, it’s difficult to give a definitive solution. It might be best to contact Unbounced directly and explain your issue or seek assistance from someone experienced in web development who can analyze your unique situation.

Log in to reply.