update the tracking code to match the correct one provided by content square

This commit is contained in:
basel 2025-11-27 02:32:11 +02:00
parent 8f10210ec4
commit fafe73a2a1
2 changed files with 10 additions and 10 deletions

View file

@ -10,15 +10,15 @@ from analytical.utils import disable_html, get_required_setting, is_internal_ip
CONTENTSQUARE_TRACKING_CODE = """\
<script>
(function (c, s, q, u, a, r, e) {
(function(c,s,q,u,a,r,e){
c.hj=c.hj||function(){(c.hj.q=c.hj.q||[]).push(arguments)};
c._hjSettings = { hjid: a };
r = s.getElementsByTagName('head')[0];
e = s.createElement('script');
e.async = true;
e.src = q + c._hjSettings.hjid + u;
c._hjSettings={hjid:a};
r=s.getElementsByTagName('head')[0];
e=s.createElement('script');
e.async=true;
e.src=q+c._hjSettings.hjid+u;
r.appendChild(e);
})(window, document, 'https://static.hj.contentsquare.net/c/csq-', '.js', %(CONTENTSQUARE_SITE_ID)s);
})(window,document,'https://static.hj.contentsquare.net/c/csq-','.js',%(CONTENTSQUARE_SITE_ID)s);
</script>
"""

View file

@ -13,15 +13,15 @@ from analytical.utils import AnalyticalException
expected_html = """\
<script>
(function (c, s, q, u, a, r, e) {
(function(c,s,q,u,a,r,e){
c.hj=c.hj||function(){(c.hj.q=c.hj.q||[]).push(arguments)};
c._hjSettings={hjid:123456789 };
c._hjSettings={hjid:a};
r=s.getElementsByTagName('head')[0];
e=s.createElement('script');
e.async=true;
e.src=q+c._hjSettings.hjid+u;
r.appendChild(e);
})(window, document, 'https://static.hj.contentsquare.net/c/csq-', '.js', 123456789);
})(window,document,'https://static.hj.contentsquare.net/c/csq-','.js',123456789);
</script>
"""