Lead Gen & CRM's tracking code allows you to take full advantage of all of the features in marketing automation. Without it, you will not be able to personalize your content based on your lead's behavior and interests.
This article will detail how to insert your tracking code to a site that uses a Wordpress theme.
Administrators | ✓ | |
Company Managers | ||
Marketing Managers | ||
Sales Managers | ||
Salespersons | ||
Jr. Salespersons |
![]() | Tip: Are you looking for information about Constant Contact’s Email and Digital Marketing product? This article is for Constant Contact’s Lead Gen & CRM product. Head on over to the Email and Digital Marketing articles by clicking here. Not sure what the difference is? Read this article. |
When adding tracking codes to Wordpress, Lead Gen & CRM strongly recommends that you use a child theme. Using a child theme instead of a parent theme helps to prevent your Wordpress content from breaking when you update.
When using a child theme, make sure the tracking code is only on the child theme for your Wordpress site. There are differences between parent and child themes. If you are using a child theme, the tracking code should not be placed in the parent theme. This is due to the fact that when the header.php for the parent theme is updated, any embedded tracking codes will be overwritten.
Child themes are not required to have a header.php file, so not every child theme may be impacted. All child themes will have a functions.php file, though. You could instead put the following tracking code in to the child theme's functions.php file:
/** * Load the Lead Gen & CRM site tracking script * into the <head> of the WordPress site */ function load_lead gen & crm_tracking() { ?> <!--INSERT YOUR LEAD GEN & CRM TRACKING SCRIPT HERE--> <?php } add_action('wp_head', 'load_lead gen & crm_tracking');
Both do not need to occur at the same time, however. You need to only place tracking code in either the header.php of their child theme, or put the tracking code in the functions.php file of the child theme.
Refer to Wordpress' external support documentation for more information on creating child themes.
You can add tracking code to Wordpress themes.
To add tracking code, do the following:
</head>
tag.Note: Constant Contact offers Professional Services to assist with custom coding.
When modifying Wordpress themes, consider the following:
</body>
tag.If the editor tab is unavailable in the Appearance menu, there may be theme security settings that are blocking access to the function. Wordpress theme owners tend to do this to prevent access to what they consider as their proprietary data.
If you encounter this issue, consider the following:
If none of these are an option, you will need to contact the theme’s owner for more information.
In addition, be aware that, while tracking codes can still be placed into the page's source code, they will need to be placed on every page.
Refer to Wordpress' external support documentation for more information on themes.
Copyright © 2025 · All Rights Reserved · Constant Contact · Privacy Center