Tag Manager integration enabling marketers to include prebuilt and custom tags into a website channel. By default we provide support for the following tags:
- Google Tag Manager
- Google Tag Manager is the standard for implementing front-end services, marketing and tracking tags to a website. This integration makes it easy to include Google Tag Manager into your website to leverage andvanced tag setup.
- Integration information and installation guide
- Google Tag Manager homepage
- Google Analytics 4
- Google Analytics 4 lets you track users on your website. The default installation enables pageview tracking and basic events.
- Integration information and installation guide
- Google Analytics homepage
- Microsoft Clarity recordings and heatmaps
- Microsoft Clarity lets you record user sessions, generate heatmaps, scrollmaps and further analyze your website users. The service is completely free.
- Integration information and installation guide
- Microsoft Clarity homepage
- VWO A/B Testing
- VWO lets you optimize digital experiences and maximize conversions using their suite of tools. This integration is focusing on front-end A/B testing capability. It installs VWO SmartCode into your wesite
- Integration information and installation guide
- Visit VWO homepage to learn more about the product
- Intercom Messenger
- Intercom offers a suite of tools to promising they are "The only AI customer service solution you need". The focus of this integration is their Messenger allowing you to communicate with customers live through your website.
- Integration information and installation guide
- Intercom homepage
- Custom HTML Snippet
- Whenever you need to copy and paste a simple code snippet form another service into your website.
- Custom Tag Module
- When the site admin wants to enable a new pre-defined code snippet to be used by marketers.
- Integration information and installation guide
Xperience Version | Library Version |
---|---|
>= 30.0.0 | >= 4.0.0 |
>= 29.0.0 | >= 3.0.0 |
>= 28.3.1 | >= 2.0.0 |
>= 28.1.0 | >= 1.0.0 |
Add the package to your application using the .NET CLI
dotnet add package Kentico.Xperience.TagManager
-
Include
Kentico.Xperience.TagManager
project in the solution.dotnet add package Kentico.Xperience.TagManager
-
Register required services into DI container.
// Program.cs var builder = WebApplication.CreateBuilder(args); // ... builder.Services.AddKenticoTagManager(builder.configuration);
-
In the administration go to UI application 'Tag Management'.
-
Create a new record:
- Fill in a tag name
- Select one of the channels.
- Select whether you want to use Custom Code Snippet or other Snippet type
- We have prepared some of the most often used types:
- For
- 'Google Tag Manager',
- 'Google Analytics 4',
- 'VWO',
- 'Intercom',
- 'Microsoft Clarity',
- or Your own type
- select one of these options from the Snippet type dropdown
- For
- For 'Custom code snippet' fill in entire code you want to render.
- Select a location:
- Top of the head - inserts a script immediately after the opening head tag.
- Bottom of the head - inserts a script right before the closing head tag.
- Top of the body - inserts a script immediately after the opening body tag.
- Bottom of the body - inserts a script right before the closing body tag.
- Select a location:
- Select tag location within the rendered page HTML
- Fill in a consent if required.
- Check 'Enable tag rendering' to activate the tag or uncheck to deactivate
- Select whether you want to display tags in the Xperience administration preview or Page Builder, or both. This option defaults to None.
-
During rendering the livesite page, the Tag manager module automatically adds custom code snippets with accepted consents to defined locations.
-
To dynamically update the rendered code snippets, for example if a consent is accepted, call javascript function
window.xperience.tagManager.updateCodeSnippets()
.
If you use the Continuous Deployment feature to deploy data to an environment with Xperience by Kentico Tag Manager, you may need to adjust your repository.config configuration file. The Tag Manager works with the following object types:
kenticotagmanager.channelcodesnippet
kenticotagmanager.channelcodesnippetitem
Running the CD restore (with <RestoreMode>
set to Full
) removes any Tag Manager scripts that exist on the target instance, but are not included in the CD data.
You can prevent this issue by adding excluded object types to your repository.config file, for example:
<ExcludedObjectTypes>
<ObjectType>kenticotagmanager.channelcodesnippet</ObjectType>
<ObjectType>kenticotagmanager.channelcodesnippetitem</ObjectType>
</ExcludedObjectTypes>
With this configuration, the Tag Manager script object types are ignored by CD, and can only be managed directly on the target instance (for example your production environment).
To see the guidelines for Contributing to Kentico open source software, please see Kentico's CONTRIBUTING.md
for more information and follow the Kentico's CODE_OF_CONDUCT
.
Instructions and technical details for contributing to this project can be found in Contributing Setup.
Distributed under the MIT License. See LICENSE.md
for more information.
This project has Full support by 7-day bug-fix policy.
See SUPPORT.md
for more information.
For any security issues see SECURITY.md
.