Hello, I checked the Javascript console, and it recieves error from your Analytics code – please double check and maybe copy paste the code again to CMP..
Uncaught SyntaxError: Unexpected token & on line 59
Ales
Thread Starter
ini0r
(@ini0r)
Thanks for that quick reply, just done copy-paste again do you still see the error ?
Unfortunately yes, it seems like a mismatch encoding of quotes used in your code.
could you try to copy paste this code?:
var _paq = _paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u='https://analytics.octarine.io/'; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', '15']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); })();
-
This reply was modified 7 years, 4 months ago by
NiteoThemes.
Thread Starter
ini0r
(@ini0r)
Using your pasted code here seems to solve the error on source (can you confirm ?)
For the record here’s the exact string I first pasted into CMP :
<!-- Matomo -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://analytics.octarine.io/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '15']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Matomo Code -->
On validation <script> and <!– where stripped so I don’t know where’s is the bug, thanks a lot !
Yes it works now.
It did not like the double quotes in your original code. I am not really sure why, as you can use single or double quotes in JavaScript.
Anyway, glad it works now as expected 🙂
If you feel up to, you can leave a feedback for our plugin https://ww.wp.xz.cn/plugins/cmp-coming-soon-maintenance/#reviews here 🙂
cheers, Ales