Skip to content

Commit fafe73a

Browse files
update the tracking code to match the correct one provided by content square
1 parent 8f10210 commit fafe73a

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

analytical/templatetags/contentsquare.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
CONTENTSQUARE_TRACKING_CODE = """\
1212
<script>
13-
(function (c, s, q, u, a, r, e) {
13+
(function(c,s,q,u,a,r,e){
1414
c.hj=c.hj||function(){(c.hj.q=c.hj.q||[]).push(arguments)};
15-
c._hjSettings = { hjid: a };
16-
r = s.getElementsByTagName('head')[0];
17-
e = s.createElement('script');
18-
e.async = true;
19-
e.src = q + c._hjSettings.hjid + u;
15+
c._hjSettings={hjid:a};
16+
r=s.getElementsByTagName('head')[0];
17+
e=s.createElement('script');
18+
e.async=true;
19+
e.src=q+c._hjSettings.hjid+u;
2020
r.appendChild(e);
21-
})(window, document, 'https://static.hj.contentsquare.net/c/csq-', '.js', %(CONTENTSQUARE_SITE_ID)s);
21+
})(window,document,'https://static.hj.contentsquare.net/c/csq-','.js',%(CONTENTSQUARE_SITE_ID)s);
2222
</script>
2323
"""
2424

tests/unit/test_tag_content_square.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313

1414
expected_html = """\
1515
<script>
16-
(function (c, s, q, u, a, r, e) {
16+
(function(c,s,q,u,a,r,e){
1717
c.hj=c.hj||function(){(c.hj.q=c.hj.q||[]).push(arguments)};
18-
c._hjSettings={hjid:123456789 };
18+
c._hjSettings={hjid:a};
1919
r=s.getElementsByTagName('head')[0];
2020
e=s.createElement('script');
2121
e.async=true;
2222
e.src=q+c._hjSettings.hjid+u;
2323
r.appendChild(e);
24-
})(window, document, 'https://static.hj.contentsquare.net/c/csq-', '.js', 123456789);
24+
})(window,document,'https://static.hj.contentsquare.net/c/csq-','.js',123456789);
2525
</script>
2626
"""
2727

0 commit comments

Comments
 (0)