Forum Moderators: buckworks & skibum

Message Too Old, No Replies

How to combine ClickPatrol tracking template with my template?

         

MatzeVL

9:15 pm on Aug 24, 2023 (gmt 0)



We moved to ClickPatrol because they have better performance in Europe and US. I discovered that hubspot trackingtemplate works well with their trackingtemplate. Now I am curious if I can also integrate it with my own tracktemplate.

I've build a own tracking template for Google ads, which looks like this:

My trackingtemplate is:
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;
?>

Clickpatrol 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.

Can't really find a good source where it's explained, wondering if someone has experience with the tracking template of ClickPatrol?




[edited by: not2easy at 12:06 pm (utc) on Aug 27, 2023]
[edit reason] specifics removed - see Charter [/edit]