Can I place the code inside my Google Tag Manager?

Sure you can! We aim to please.

We have many clients using GTM to manage their sites. There is a slight adjustment that you'll need to apply to your unique AbandonAid script before pasting it into your site. This is due to syntax constraints in the tag manager itself, but don't worry! It works just fine.

 

Here is an example of our actual script generated in the Get Code tab of our dashboard:  

<script type="text/javascript">

var pkBaseURL = (("https:" == document.location.protocol) ? "https://" : "http://");

document.write(unescape("%3Cscript src='" + pkBaseURL + "ADDRESS_OF_YOUR_SCRIPT_HERE' type='text/javascript'%3E%3C/script%3E")); 

</script>

 

Before you place the script into the tag manager, you must take the ADDRESS_OF_YOUR_SCRIPT_HERE string and paste it in. 

 

<script>                                                                                                                            
var tag = document.createElement('script');                                                                      
var pkBaseURL = (("https:" == document.location.protocol) ? "https://" : "http://");                   tag.src = pkBaseURL + "ADDRESS_OF_YOUR_SCRIPT_HERE ";                                           var s = document.getElementsByTagName('script')[0];                           s.parentNode.insertBefore(tag, s);
</script>




If you run into any issues, or if this looks like Greek to you, we have your back. Open a ticket and we will be happy to help you with the implementation.

Have more questions? Submit a request

Comments