Installing the Tracking Pixel
SegMetrics comes with its own Tracking Pixel that collects advanced metrics on your leads, including their real lead source, optin URL, UTM codes from when they first hit your site, geo-location and much, much more.
Installing the Pixel
- Go to your Site Setup page from the gear in the top menu
Copy the pixel code and put it on every page of your website, right before the closing
</body>
tag.You should include this code even on pages where you don't have any optin forms, so that we can accurately track your lead sources.
- You can also install the pixel using Google Tag Manger or other script-manager.
Available Options
There are a number of options available for the Tracking Pixel, depending on your use case. When you save your settings they will automatically be applied everywhere it's installed.
Populate UTM fields on your existing forms | Enable this option to add the UTM fields to any forms on the page. This will allow the UTM values to be saved in Keap in addition to SegMetrics. In order to enable this, you will need to set up your Custom Fields. |
Track forms in iFrames | Due to browser security issues, it is not possible to track inputted emails and form submissions through iFrames. After enabling this option, make sure that the SegMetrics pixel is installed on both the main page AND the iFrame page to ensure correct tracking. |
Track users across multiple root domains | Due to privacy concerns, cookies are not shared between different root domains (example.com and example-site.com would be an example). Turning this option on will use a third-party cookie to track users across multiple domains that you own. Please note that third-party cookies may be blocked by default on some browsers, so if you don't absolutely need it, we recommend leaving this feature unchecked. |
How the Tracking Pixel Works
The tracking pixel currently tracks two different values as users visit your site: the optin values, and the journey values.
Optin Values
Optin Values are the UTM values, URL and Referring Domain that a lead first visits your site with, and are added to the contact record the FIRST time the contact record is created.
These values will not be updated, and function as a "where did this lead come from" report in SegMetrics.
Journey Values
Journey Values track visitors and leads through the entire user experience, whether they've joined your list or not. Once the visitor joins your list, we connect that historical data (up to 60 days) with the contact to create a complete journey path.
Here is how we track and calculate Journey Values:
- When a visitor comes to your site, they are given a unique ID.
- Any URL that has a UTM value, ad_id, contactId, ContactId, contact_id, c, seg_cid or email in the query string will be tracked as a click. This includes email clicks, ad clicks and site clicks.
- Any URL that has a seg_cid, contactId or email in the query string will call an identify call, which connects the current unique ID to the contact record. This enables us to track contacts across multiple devices.
- Any time a contact fills out a field with a valid email address, we will call an identify call, which will connect the current unique ID to the contact record.
- The latest tracked click before the contact was created is considered the First Optin action. (There will only be one First Optin)
- The latest tracked click before an optin (up to 60 minutes) is considered the Optin action. (There can be multiple Optins through a contact's lifetime)
- The latest tracked click before a purchase (up to 60 minutes) is considered the Purchase action.
Recommendation: Add seg_cid to all email links
Depending on your CRM Integration, you'll want to use either the seg_cid (contact id) or email values to track users:
- Keap - http://example.com/?seg_cid=~Contact.Id~
- ActiveCampaign - http://example.com/?seg_cid=%CONTACTID%
- Ontraport - http://example.com/?email=[Email]
- Drip - (done automatically! No need for a setting)
- HubSpot - http://example.com/?seg_cid=~{{contact.id}}
- ConvertKit - http://example.com/?seg_cid=~{{subscriber.id}}
- Klaviyo - http://example.com/?email={{ email }}
- MailChimp - http://example.com/?seg_cid=*|UNIQID|*