I am currently working on a unique way to automatically fill in the google adwords remarketing tag. Here is the structure of the google code:
<script type="text/javascript">
var google_tag_params = {
dynx_itemid: 'REPLACE_WITH_VALUE',
dynx_itemid2: 'REPLACE_WITH_VALUE',
dynx_pagetype: 'REPLACE_WITH_VALUE',
dynx_totalvalue: 'REPLACE_WITH_VALUE',
};
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = {converion-id}; // replace {converion-id} with your conversion id
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<!-- replace {converion-id} with your conversion id -->
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/{converion-id}/?value=0&guid=ON&script=0"/>
</div>
</noscript>
My goal is to dynamically change the dynx_itemid variable using Angular every time a new page is loaded. I would appreciate any suggestions or feedback. I came across this library https://github.com/mooyoul/angulartics-google-adwords-remarketing-tag, but it only supports the remarketing tag, not the dynamic one.
Thank you