Skip to content

Commit

Permalink
Merge pull request #36 from Kentico/feat/friendly-ci-cd-warning
Browse files Browse the repository at this point in the history
feat(Docs): warning message to disable Tag Manager objects in CI/CD
  • Loading branch information
bkapustik authored Jul 29, 2024
2 parents 20e3b83 + 1e945b1 commit cf61a98
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Tag Manager integration enabling marketers to include prebuilt and custom tags i
- 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](./docs/Creating-custom-module.md)

## Screenshots

Expand Down Expand Up @@ -109,6 +110,26 @@ dotnet add package Kentico.Xperience.TagManager
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()`.

## Continuous Deployment configuration

If you use the [Continuous Deployment](https://docs.kentico.com/x/YgaiCQ) feature to deploy data to an environment with Xperience by Kentico Tag Manager, you may need to adjust your *repository.config* [configuration file](https://docs.kentico.com/x/ygAcCQ). 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).

## Contributing

To see the guidelines for Contributing to Kentico open source software, please see [Kentico's `CONTRIBUTING.md`](https://github.com/Kentico/.github/blob/main/CONTRIBUTING.md) for more information and follow the [Kentico's `CODE_OF_CONDUCT`](https://github.com/Kentico/.github/blob/main/CODE_OF_CONDUCT.md).
Expand Down

0 comments on commit cf61a98

Please sign in to comment.