How to use variables in ClickPatrol tracking template
I've build a own tracking template for Google ads, which looks like this:
http://tracking.example.com?lpurl={lpurl}
This tracking link (where {lpurl} is the final url) leads to our website and triggers the script below.
<?php header("Status: 301 Moved Permanently"); // some code to add data to our database // then redirect traffic to url: header("Location:".$_GET["lpurl"]."?". $_SERVER['QUERY_STRING']); exit; ?>
I have started using ClickPatrol.com for click fraud protection and PPC protection. However, they also require a tracking template. They work well with Hubspot, but I don't know how to combine their tracking template with mine and modify my script.
their trackingtemplate is: https://example.com/?uid=[unique id]&adp={adposition}&lpm={loc_physical_ms}&lim={loc_interest_ms}&adi={adgroupid}&k={keyword}&n={network}&ci={campaignid}&d={device}&p={placement}&u={lpurl}&ma={matchtype}&ta={target}&cr={creative}
Any idea how I can combine:
http://example.com?url={lpurl}
and
https://example.com/?uid=[unique id]&adp={adposition}&lpm={loc_physical_ms}&lim={loc_interest_ms}&adi={adgroupid}&k={keyword}&n={network}&ci={campaignid}&d={device}&p={placement}&u={lpurl}&ma={matchtype}&ta={target}&cr={creative}
I want to track my traffic with my own script and also use ClickPatrol
I attempted to merge the querystring and redirect it, but the urls in the querystring made it difficult to decode and encode, resulting in redirecting errors.