This content is likely not relevant anymore. Try searching or browse recent questions.
Hello,
How can I write the values out to the dataLayer section below so that the variable names in the {{ }} brackets have real values in them? For example: {{campaign}}
Do I need to take them out of an AngularJS model for example?
<script>
dataLayer = [];
</script>
<script>
dataLayer = [{
'campaign': '{{campaign}}',
'click_id': '{{click_id}}',
'event': '{{event}}',
'memberID': '{{memberID}}',
'source': '{{source}}',
'term': '{{term}}',
'saleAmount': '{{saleAmount}}'
}];
</script>
<!-- Google Tag Manager -->
<script> ... </script>
<!-- End Google Tag Manager -->
<!-- Google Tag Manager (noscript) -->
<noscript> ... </noscript>
<!-- End Google Tag Manager (noscript) -->
Many thanks!
Mike
Details
This question is locked and replying has been disabled.
Link to post
Delete post?
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.