Set Up ClickDimensions Web Tracking

NOTE: On January 22, 2017, ClickDimensions updated the web tracking script in order to remove some functions that are being deprecated by some browsers. The older script will continue to work for most browsers for some time, however it is important to update your script as soon as possible. Read more about this update here.

Video

Written Instructions


If you have not done so already, you need to first set up your domain(s) for Web Tracking to work.

Adding your Tracking Script to your website will enable ClickDimensions Web Tracking so you can see real-time information on who’s visiting your site. If you would like to track multiple websites, instructions on how to do so can be found in this article.

Step 1: Navigate to Tracking Script.

Locate your script by going to Settings > ClickDimensions > ClickDimensions Settings.

2016-navigation-cd-settings

Now choose Tracking Script.

Icon

Step 2: Copy the script and place on your site.

When you click on Tracking Script you will see your unique script. Be sure are read the instructions on the page to understand how to place the script. An easy way to add your script is to place it into your global footer file or any other mechanism that causes it to be placed on each page. It is best to place the JavaScript toward the bottom of the page and always before the end body tag </body> for the page.

Tracking Script updated

NOTE: If the script is being placed on a site that has a different domain than what is in the cdAnalytics.setDomain parameter then change that text to the domain of the site when you place the script on the site. For example, the tracking script shown above has the following line:
cdAnalytics.setDomain(‘clickdimensions.com’);

If your website is at www.mycompany.com, you will change the line in the script to:
cdAnalytics.setDomain(‘mycompany.com’);

NOTE: If you would like to put a score of zero (0) on specific pages, you’ll need to replace your tracking script with the current one (shown above).

Step 3: Optionally add other special scripts.

There are three additional optional scripts below the tracking script.

Give Certain Page(s) a Different Score

This script can let you set a specific score for a certain page other than what you set in your overall Score Settings. Simply add the following three lines of script to the pages whose score you would like to override and set the value of cdScore to whatever you want the score for the page to be. Note that the score value can be negative by adding the “–“ symbol directly before the score value. For example, the JavavScript could be “var cdScore = -25;”. You may have as many custom scored pages as you like. The script should be placed before the base tracking script.

<script type=”text/javascript”>
var cdScore = 5;
</script>

Score Script

Page View Score

Priority Page(s)

The second script can be placed on a page to highlight that page in the tracking summary on lead and contact record profile pages. They will show up as Page Views (other pages will not do this by default) and along with the Visit(s) they’re associated with. Simply add the following three lines of script to the pages you would like to highlight. The script should be placed before the base tracking script. These are referred to as ‘priority pages’. By the way, if you make multiple pages priority pages, the most recently accessed will float to the top.

<script type=”text/javascript”>
var cdPriority = true;
</script>

Priority

Tracking Summary

Associate Page(s) with a CRM Campaign

Page Views and Visits can be automatically associated with Campaign records in Microsoft CRM. Simply add the following three lines of script to the pages you would like to associate with CRM campaign records. Be sure and substitute the campaign code listed below (i.e. CMP-01005-ZBPTHS) with the CRM generated campaign code to which you would like the Page Views and Visits associated. The campaign code is case-sensitive. If you customized a campaign code, it can still work with this tracking. Please just make sure the case matches exactly (ie, special1 and SPECIAL1 will not be considered the same). This script should also be placed above the tracking script in the page’s HTML.

<script type=”text/javascript”>
var cdCampaignKey = ‘CMP-01005-ZBPTHS’;
</script>

The Campaign Code is found in the Campaign record as highlighted below. Please use this value instead of the example Campaign Code in the code above.

Campaign Code

Campaign

Page View Campaign


If you have not done so already, you need to first set up your domain(s) for Web Tracking to work.

Adding your Tracking Script to your website will enable ClickDimensions Web Tracking so you can see real-time information on who’s visiting your site. If you would like to track multiple websites, instructions on how to do so can be found in this article.

Watch a Video on Inserting the Tracking Script

 

Written Instructions

Step 1: Navigate to Tracking Script.

Locate your script by going to Settings > ClickDimensions > ClickDimensions Settings > Tracking Script.

TrackingScript

Step 2: Copy the script and place on your site.

When you click on Tracking Script you will see your unique script. Be sure are read the instructions on the page to understand how to place the script. An easy way to add your script is to place it into your global footer file or any other mechanism that causes it to be placed on each page. It is best to place the JavaScript toward the bottom of the page and always before the end body tag </body> for the page.

Tracking Script updated

NOTE: If the script is being placed on a site that has a different domain than what is in the cdAnalytics.setDomain parameter then change that text to the domain of the site when you place the script on the site. For example, the tracking script shown above has the following line:
cdAnalytics.setDomain(‘clickdimensions.com’);

If your website is at www.mycompany.com, you will change the line in the script to:
cdAnalytics.setDomain(‘mycompany.com’);

NOTE: If you would like to put a score of zero (0) on specific pages, you’ll need to replace your tracking script with the current one (shown above).

Step 3: Optionally add other special scripts.

There are three additional optional scripts below the tracking script.

Give Certain Page(s) a Different Score

This script can let you set a specific score for a certain page other than what you set in your overall Score Settings. Simply add the following three lines of script to the pages whose score you would like to override and set the value of cdScore to whatever you want the score for the page to be. Note that the score value can be negative by adding the “–“ symbol directly before the score value. For example, the JavavScript could be “var cdScore = -25;”. You may have as many custom scored pages as you like. The script should be placed before the base tracking script.

<script type=”text/javascript”>
var cdScore = 5;
</script>

extra script 1

ScoreForSpecialPages

Priority Page(s)

The second script can be placed on a page to highlight that page in the tracking summary on lead and contact record profile pages. They will show up as Page Views (other pages will not do this by default) along with the Visit(s) they’re associated with. Simply add the following three lines of script to the pages you would like to highlight. The script should be placed before the base tracking script. These are referred to as ‘priority pages’. By the way, if you make multiple pages priority pages, the most recently accessed will float to the top.

<script type=”text/javascript”>
var cdPriority = true;
</script>

extra script 2

PriorityPage

Associate Page(s) with a CRM Campaign

Page Views and Visits can be automatically associated with Campaign records in Microsoft CRM. Simply add the following three lines of script to the pages you would like to associate with CRM campaign records. Be sure and substitute the campaign code listed below (i.e. CMP-01005-ZBPTHS) with the CRM generated campaign code to which you would like the Page Views and Visits associated. The campaign code is case-sensitive. If you customized a campaign code, it can still work with this tracking. Please just make sure the case matches exactly (ie, special1 and SPECIAL1 will not be considered the same). This script should also be placed above the tracking script in the page’s HTML.

<script type=”text/javascript”>
var cdCampaignKey = ‘CMP-01005-ZBPTHS’;
</script>

The Campaign Code is found in the Campaign record as highlighted below. Please use this value instead of the example Campaign Code in the code above.

CampaignCode

extra script 3

SpecialCampaign


Feature Added: Original
Feature Updated: January 2017
ClickDimensions Version Needed: Any