Skip to content

Kentico/xperience-by-kentico-tag-manager

Repository files navigation

Xperience by Kentico Tag Manager

7-day bug-fix policy CI: Build and Test NuGet Package

Description

Tag Manager integration enabling marketers to include prebuilt and custom tags into a website channel. By default we provide support for the following tags:

Screenshots

UI Application

Custom tags listing

Create GTM tag snippet

Create custom code snippet

Library Version Matrix

Xperience Version Library Version
>= 29.0.0 >= 3.0.0
>= 28.3.1 >= 2.0.0
>= 28.1.0 >= 1.0.0

Dependencies

Package Installation

Add the package to your application using the .NET CLI

dotnet add package Kentico.Xperience.TagManager

Quick Start

  1. Include Kentico.Xperience.TagManager project in the solution.

    dotnet add package Kentico.Xperience.TagManager
  2. Register required services into DI container.

    // Program.cs
    
    var builder = WebApplication.CreateBuilder(args);
    
    // ...
    
    builder.Services.AddKenticoTagManager(builder.configuration);
  3. In the administration go to UI application 'Tag Management'.

  4. Create a new record:

    • 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 '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.
    • Fill in a consent if required.
  5. During rendering the livesite page, the Tag manager module automatically adds custom code snippets with accepted consents to defined locations.

  6. To dynamically update the rendered code snippets, for example if a consent is accepted, call javascript function window.xperience.tagManager.updateCodeSnippets().

Contributing

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.

License

Distributed under the MIT License. See LICENSE.md for more information.

Support

7-day bug-fix policy

This project has Full support by 7-day bug-fix policy.

See SUPPORT.md for more information.

For any security issues see SECURITY.md.