matssofts
Forum Replies Created
-
Forum: Plugins
In reply to: [Account Engagement] Why is the Pardot tracking code commented out?Here are the two versions of the code. As you can see – the only difference as stated in the Pardot article is the <!– and –> HTML comments used inside the script tags. So in my understanding, because the script is inline on the page the HTML rendering is treating the actual script functions as being commented out – hence it does not execute the inline script functions and because you are missing some code from the javascript file then it does not recognise the last line of the code as being ignored. Perhaps I am wrong. But the code implemented is exactly what Pardot are suggesting doesn’t happen.
Here is the code directly from the campaign settings:
<script type="text/javascript"> piAId = '340831'; piCId = '2155'; (function() { function async_load(){ var s = document.createElement('script'); s.type = 'text/javascript'; s.src = ('https:' == document.location.protocol ? 'https://pi' : 'http://cdn') + '.pardot.com/pd.js'; var c = document.getElementsByTagName('script')[0]; c.parentNode.insertBefore(s, c); } if(window.attachEvent) { window.attachEvent('onload', async_load); } else { window.addEventListener('load', async_load, false); } })(); </script>Here is the code that is being inserted by the plugin:
<script type="text/javascript"> <!-- piCId = '2155'; piAId = '340831'; (function() { function async_load(){ var s = document.createElement('script'); s.type = 'text/javascript'; s.src = ('https:' == document.location.protocol ? 'https://pi' : 'http://cdn') + '.pardot.com/pd.js'; var c = document.getElementsByTagName('script')[0]; c.parentNode.insertBefore(s, c); } if(window.attachEvent) { window.attachEvent('onload', async_load); } else { window.addEventListener('load', async_load, false); } })(); --> </script>As stated – the tracking code appears to record page visits in the visitors section in Pardot – but when you go into a known prospect you are not seeing any page views apart from Pardot driven pages. Changing the code from plugin to Pardot sourced code fixed that problem – and that was the only change that was made.
- This reply was modified 9 years ago by matssofts.
Forum: Plugins
In reply to: [Account Engagement] Why is the Pardot tracking code commented out?Hi Cliff,
Thank you for your response – but I would politely suggest that you are incorrect in some of the details.We did a test last night. We had the code that the plugin installed and code that we manually inserted on to the page running.
Before we inserted the manual code into the pages – page views were not being tracked. We were getting page visits figures but it was not tracking page views – especially for people that we already knew. It was showing no activity – despite people actively using the website.
After we inserted the manual code taken straight from the Pardot campaign screen we started to see those page views being registered.
The only specific difference was that the tracking code was commented out.
After a little more digging on the support channel for Pardot I also found this Pardot knowledge base article: http://help.pardot.com/customer/portal/articles/2125923 – the last section states that:
“Also, make sure the tracking code is not commented out – the bolded tags prevent the tracking code from working: beginning: <!– Pardot Tracking Code –> <!– end: –> <!– End of Pardot Tracking Code –>”Therefore it would appear that the code that is inserted by the plugin will never work as it is inside comment tags – according to Pardot themselves.
Thanks.