'How to add script to Leadpages?
I have found a UTM Tracking code script that I like to use on my own websites. I will try and explain how it works.
A visitor lands on the website:
The Link button on the website then displays the following at the end of the link. /?tid=fiverr
so basically whatever you decide to put after the = sign it will appear in the link on the website.
I use leadpages to make my landing pages. will I be able to just paste the code into the webpage settings? Please see attached screenshot.
What I have done so far:
In first page I have done:
<a href="sample2.php?btn=fiverr">hi</a>
In second page I have done:
<a href="?tID=<?php echo $_GET['btn'] ?>">Show</a>
If I have correct then how can I add this to my leadpages website.
Thank you in advance.
Solution 1:[1]
I'm not 100% sure that I'm following what you need to do here, but I have a fix that may work OR perhaps might nudge things in the right direction.
If the goal here is essentially for LeadPages (and whatever you are integrated with) to CAPTURE whatever that parameter is (EG: yourwebsite.com/?thing=this-is-your-param-value
with thing
being the "key" and
this-is-your-param-value
being the "value" you're storing), that is something that can be done BUT will someone depend on your integration(s) with wherever this param information is headed.
Based on your example, I'll use /?tid=fiverr
In your LeadPages page, create a form / input field. With that field, you'll want to do something like this (this is the basic form field setup):
Name your field accordingly. For simplicity, name it whatever that URL KEY is going to be. It looks like you have a couple options here...if you are going to have multiple in one parameter OR a few possible different ones, YOU'LL NEED ONE OF THESE FIELDS FOR EACH OF THEM (you'll see why shortly).
Your Label is best as whatever you "key" is. I capitalized mine for no real reason.
Your Placeholder Text should be the same as the key, but I matched the casing
Default value - make this a simple period. NOTE - if you're presenting this page in an iframe/embed, this won't work. You'll end up storing a period.
URL Mapping - this is important - it must match your "key" exactly.
Finally, select "This is a hidden field." Alternatively, test things out with the field visible first
I hope this is somewhat along the lines of what you're looking to do and offers a bit of help on your quest! It took me awhile to figure it out, myself. Best of luck! Cheers!
Solution 2:[2]
Here's a couple of things you can try.
- Insert the script in the HTML widget on Leadpages OR
- Go to settings > analytics and paste your code in the Head Section Tracking Code
You also need to keep in mind that if you are using Facebook Pixel on your Leadpages, then you would need to insert your Facebook Pixel code on the Head Section Tracking Code as well.
Let me know how it goes and whether you found a solution.
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 | Chris Mo |
Solution 2 | Engineax |