What web tracking code does
- Generates the visitor key (known as the WebSyncID), which is a unique identifier for each visitor to your tracked sites.
- Stores the WebSyncID in a first-party web browser cookie.
- Records web page visits, clicks, and other events.
- Automatically rewrites URLs to include tracking identifiers when a visitor clicks from one tracked website to another.
Add web tracking code to your site
Before you add the web tracking code to your external site, an organization administrator will need to perform these steps:
- Go to Settings > Administration > Organization settings.
- Click to expand Web Tracking Setting, scroll down to the Web Tracking Code section.
- Click Add in qualified domains.
- Enter the domain in the Domain Name field. Click Save.
- You need to copy two pieces of code.
- Web tracking meta tag: This tag identifies the domains that are as qualified domains. This code must be placed between the <head></head> tags of your web pages.
- Web tracking code: This places the web tracking cookie that inserts the first-party web cookie. This code must above the closing </body> tag.
Make sure to add your www and non-www versions of your domains (for example, citycool.com and www.citycool.com).
If your site uses Secure Socket Layer
If your site uses Secure Socket Layer, use the SSL version of the web tracking script.
To add code to Site to Support Secure Socket Layer (SSL), you will need to replace the applicable domain portion only with the appropriate secure URL for your organization's pod.
- Open your browser and go to your website.
- Open the source view on your web page.
- Paste the web tracking code into your web page's HTML header (or footer) tags.
You can add a code to site to support Secure Socket Layer (SSL). For example, if your organization is on pod 5, you could replace the domain portion of the web tracking Code with the secure URL for pdd 5 only. For more information, refer to the following Secure URLs and associated pods table.
What to do next
Note: If you are using Google Analytics and want to place the web tracking code in the <head> tag, then make sure the web tracking code is above the Google Analytics code.
When you are tracking external websites one thing to consider is the transition of the tracking metrics from a parent domain to a subdomain. When your external site contains subdomains, you must ensure that subdomains are accounted for when you qualify a domain in the web tracking settings of your organizations account. For example, if you have a subdomain such as sales.citycool.com, make sure it is included in Settings > Administration > Organization settings > Web tracking settings.
Add the recipient ID to an external web page
Complete the following steps to add the recipient ID to an external web page.
- Create a new email or choose an existing email.
- Add a Clickstream link in the email body. Make sure you add the external webpage URL in the Link Properties dialog box.
- On the external webpage, verify that it contains the Campaign web tracking code, then add the following:
ewt.getRecipientId() function: recipientId.value = ewt.getRecipientId()