Chose the data layer variable name, e.g., “VuukleAPI” and save. (Do this for all other variables needed)
Default variable list you can check Here
Advanced variable list Here
Go to Tags and create a new custom HTML tag.
Use data layer variable names for apiKey, articleId, and other variables. For example apiKey: “{{VuukleAPI}}”
On triggering chose all pages, page view.
Add GTM container as instructed by Google changing last “dataLayer” to the name you want (this is important to don’t mess with other gtms installed on the page. Here I used “Vuukle_dataLayer”.
<script>
Vuukle_dataLayer = [
{
VuukleAPI: 'api key', //replace with real api key
VuukleArticleID: 'article id', //replace with real article id
},
];
</script>
You can check DEMO page here