Hi,
Trying to embed our pixels in Launchrock, and to do so we need to be able to plug the code into the Javascript section of the advanced editor.
In this area, something like the GA code snippet syntax works perfectly:
// Google Analytics
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXX-X', 'auto');
We don’t know anything about JS. How can we change our conversion tracking snippet into a similar function?
<script src="//platform.twitter.com/oct.js" type="text/javascript"></script>
<script type="text/javascript">
twttr.conversion.trackPid('XXX');</script>
<noscript>
<img height="1" width="1" style="display:none;" alt="" src="https://analytics.twitter.com/i/adsct?txn_id=XXX&p_id=Twitter" />
<img height="1" width="1" style="display:none;" alt="" src="//t.co/i/adsct?txn_id=XXX&p_id=Twitter" /></noscript>
Put the code straight into a, what, jQuery or regular JS syntax, in other words? No script tags.
Sorry if I sound like a complete buffoon, lol.
Thanks!
Andy