We'll be with you in a second

GTM & Script using 1st party or 3rd party cookies

Docly Child

CRM integration: process overview

Estimated reading: 3 minutes

This scheme shows how the RedTrack CRM integration solution works:

Scheme explained:

Example of tracking parameters added to click (for FB):

cmpid=61dacf58ed62ea0001836b28&sub1={{ad.id}}&sub2={{adset.id}}&sub3={{campaign.id}}&ad_name={{ad.name}}&adset_name={{adset.name}}&sub6={{campaign.name}}&placement={{placement}}&utm_placement={{site_source_name}}&utm_source=Facebook

Example of the RT script that captures clickid:

<script src=”https://att.trk.agency/uniclick.js?defaultcampaignid=5e6c7d17c6565a0002738aa9&attribution=lastpaid&regviewonce=false&cookiedomain=redtrack.io&cookieduration=30″></script>

Example of the script that populates a hidden field:

<script>
function setFormClickIdValue(clickid) {
console.log(clickid)
document.querySelectorAll('input').forEach(function(el) {
console.log(el.value)
if (el.value.indexOf("{clickid}")>-1) {
el.value = el.value.replace(/{clickid}/, clickid)
}
});
}
function getCookie(name) {
var value = "; " + document.cookie;
var parts = value.split("; " + name + "=");
if (parts.length == 2) return parts.pop().split(";").shift();
}
if (getCookie('rtkclickid-store') !== null && getCookie('rtkclickid-store') !== undefined && getCookie('rtkclickid-store') !== 'undefined') {
setTimeout(function(){
setFormClickIdValue(getCookie('rtkclickid-store'))
}, 3000)
}
</script>

Example of webhook from CRM to RedTrack.io:

https://att.trk.agency/postback?clickid={replace_me}&type=Lead

In “type=Lead” Type defines the conversion event type. RedTrack.io supports 20 custom conversion events.

Example of the link with some of the parameters:

https://custom.tracking.domain/postback?clickid={replace}&sum={replace}&type={replace}&eventid={replace}&email={replace}&phone={replace}&lname={replace}&fname={replace}&zip={replace}

In this link pay attention to the list of WebHooks Postback meta-data parameters which mean the following:

✎ clickid={replace} – clickid that you have captured.
✎ sum={replace} – purchase amount (if available). If not applicable – do not send.
✎ type={replace} – conversion type – ex InitateCheckout or Purchase. Spaces and Capital letters are important as we interpret events exactly as they are.
✎ currency={replace} – add if the currency is different from the one setup on the Brand level.
✎ coupon={replace} – for attribution and data, provide coupon value used with purchase.
✎ eventid={replace} – with event id, can also be our clickid if logic is maintained. The role should be set up in RedTrack.io UI on the Brand level.
✎ email={replace} – if hashed – use SHA256 as advised by Facebook.

The role should be set up in RedTrack.io UI on the Brand level:

✎ phone={replace} – if hashed – use SHA256 as advised by Facebook . The role should be set up in RedTrack.io UI on the Brand level.
✎ lname={replace} – if hashed – use SHA256 as advised by Facebook .The role should be set up in RedTrack.io UI on the Brand level.
✎ fname={replace} – if hashed – use SHA256 as advised by Facebook The role should be set up in RedTrack.io UI on the Brand level.
✎ zip={replace} – if hashed – use SHA256 as advised by Facebook. The role should be set up in RedTrack.io UI on the Brand level.

The processed clicks data is reflected in the multi-touch/cross-campaign attribution dashboard (Conversion Path report)