'How to pass UTM parameters from 1 page to another in squarespace?
I have a form on a subpage in Squarespace and I am able to pull UTM parameters directly from the link on that page. But we are using this for an ad campaign, the ad directs users to the index page and then users click on the button to get to the form page. During this process UTM parameters in URL are being stripped.
Example:
the index page is on xyz.com, and from ads, we get the URL xyz.com?SQF_UTM_SOURCE=facebook&SQF_UTM_MEDIUM=cpc
How do I pass these parameters to the next page in Squarespace?
Solution 1:[1]
Generally speaking, you must 1) obtain the parameters from the URL, then 2) identify any/all applicable links (or buttons) on the page which direct to pages which you want to pass the parameters to, and finally 3) add those parameters to the href attribute of those links/buttons.
This can be done using JavaScript inserted via Footer Code Injection in Squarespace, such as the examples on GitHub or SO here and here, and using Google Tag Manager.
If you'd like more specific help, it's best to provide any code you've tried along with your question.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Brandon |
