Skip to content

Global Attribution

Whether we are hosting your landing page, or you are, we would have spent time ensuring that each user that lands, arrives with a unique identifier (UID), and that that UID gets passed through the contact form, so that we can continue to track that users progress through the later stages of your sales funnel.

However, what if there are links from your landing page to other areas of your site? What if that user exits the landing page and has a browse around your site before eventually filling in a contact form in another area of your site?

By default, these types of interactions wouldn't be tracked, and your marketing campaign would fail to receive the correct attribution for that lead.

This is where global attribution comes in. A set of simple tasks that will ensure your site is able to correctly capture these types of user flow.

UID passing

As an overview, the goal is to capture our UID via a site wide script, and store it in a cookie or other long term session storage solution. Then, on any form submission, add this UID for your forms data and make a call to us to tell us you've had a lead!

If we are hosting your landing page, we will ensure that any external link to your primary website is appended with the UID. E.g. https://example.com/about?uid=12345.

It is then your responsibility to ensure this UID is persisted across page visits. An easy way to do so is to store it in a cookie, and then check for that cookie on all forms found on your website. Ensuring it is passed through and that our pixel is called on submission if that cookie is found.

If you are hosting your landing page, and that landing page is on the same domain as your main site, you can set this cookie as soon as a user lands. Then the same simple checks would need to be in place on form submission, to pass the cookie value through and call our pixel.

Example Implementation

WordPress & Contact Form 7 (PHP)

Add to functions.php to add the UID to a cookie when present:

// set uid cookie
if (!empty($_GET['uid'])) {
  setcookie(
    'ci_e2e_uid',
    $_GET['uid'],
    strtotime('+365 days'),
    '/',
    'yourdomain.com'
  );
}

Add to functions.php to hook into Contact Form 7 form submissions and add the uid to the field list:

function action_wpcf7_posted_data($formData)
{
  if (!empty($_COOKIE['ci_e2e_uid'])) {
    $formData['uid'] = $_COOKIE['ci_e2e_uid'];
  }
  return $formData;
}
add_filter('wpcf7_posted_data', 'action_wpcf7_posted_data', 10, 1);

Testing

You should ensure that everything is working before going live with a campaign.

You should be able to append ?uid=1234 to your main site, and if you went with a cookie based solution, see a cookie available in your developer console. For Chrome, instructions on checking this can be found here: https://developers.google.com/web/tools/chrome-devtools/storage/cookies.

You should then perform a test form submission on your main site, and ensure that a UID field is present in your CRM system (or wherever your form submissions end up) with a value of 1234.

Finally you should see a stage two pixel drop as per the test instructions for pixel implementation, or you can call this pixel server-side, and confirm with our AdOps team that we received the call successfully.