CRM integration: process overview
This scheme shows how the RedTrack CRM integration solution works:
Scheme explained:
RedTrack.io provides the CRM integration solution by using tracking parameters attached to each incoming click (with the default setting for direct/organic traffic)
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
The script captures the incoming click and generates a unique id for each click
Example of the RT script that captures clickid:
<script src=”https://att.trk.agency/uniclick.js?defaultcampaignid=5e6c7d17c6565a0002738aa9&attribution=lastpaid®viewonce=false&cookiedomain=redtrack.io&cookieduration=30″></script>
The script pushes the clickid value from the 1st party cookie to the hidden field and adds clickid to the CRM record
✔ Script that pushes value to the hidden field should work with a little delay (in GTM you can set Trigger as “All clicks”). Meaning this script should be triggered only after the universal script has already been successfully executed, otherwise, there will be no clickid value in the cookie to be pushed to the hidden field.
Example of the script:
<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>
Deterministic attribution is based on matching the id from the CRM record to the id of the stored click. Smart attribution AI finds all the clicks from the same user/device and assigns it to the last paid channel click
Example of webhook from CRM to RedTrack.io:
https://att.trk.agency/postback?clickid={replace_me}&type=Lead
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}
✎ clickid={replace} – clickid that you have captured.
✎ sum={replace} – purchase amount (if available). If not applicable – do not send.
✎ type={replace} – conversion type – ex InitiateCheckout 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/Offer source level:
✎ phone={replace} – if hashed – use SHA256 as advised by Facebook . The role should be set up in RedTrack.io UI on the Brand/Offer source level.
✎ lname={replace} – if hashed – use SHA256 as advised by Facebook .The role should be set up in RedTrack.io UI on the Brand/Offer source level.
✎ fname={replace} – if hashed – use SHA256 as advised by Facebook The role should be set up in RedTrack.io UI on the Brand/Offer source level.
✎ zip={replace} – if hashed – use SHA256 as advised by Facebook. The role should be set up in RedTrack.io UI on the Brand/Offer source level.
Check out this article explaining the significance of Roles in RT.
The processed clicks data is reflected in the multi-touch/cross-campaign attribution dashboard (Conversion Path report)