mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-03-16 22:20:25 +00:00
Remove obsolete type attribute in script tags
This commit is contained in:
parent
d3ddf1ac6a
commit
4540999dc1
23 changed files with 33 additions and 34 deletions
|
|
@ -3,6 +3,7 @@ Unreleased
|
||||||
* Remove deprecated Piwik integration. Use Matomo instead! (Peter Bittner)
|
* Remove deprecated Piwik integration. Use Matomo instead! (Peter Bittner)
|
||||||
* Migrate packaging from setup.py to pyproject.toml with Ruff for linting
|
* Migrate packaging from setup.py to pyproject.toml with Ruff for linting
|
||||||
and formatting (Peter Bittner)
|
and formatting (Peter Bittner)
|
||||||
|
* Remove obsolete type attribute in script tags for JavaScript (Peter Bittner)
|
||||||
|
|
||||||
Version 3.1.0
|
Version 3.1.0
|
||||||
-------------
|
-------------
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,9 @@ from django.template import Library, Node, TemplateSyntaxError
|
||||||
from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
||||||
|
|
||||||
USER_ID_RE = re.compile(r'^\d+$')
|
USER_ID_RE = re.compile(r'^\d+$')
|
||||||
INIT_CODE = (
|
INIT_CODE = """<script>var _sf_startpt=(new Date()).getTime()</script>"""
|
||||||
"""<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>"""
|
|
||||||
)
|
|
||||||
SETUP_CODE = """
|
SETUP_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _sf_async_config=%(config)s;
|
var _sf_async_config=%(config)s;
|
||||||
(function(){
|
(function(){
|
||||||
function loadChartbeat() {
|
function loadChartbeat() {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
||||||
|
|
||||||
CLICKMAP_TRACKER_ID_RE = re.compile(r'^\w+$')
|
CLICKMAP_TRACKER_ID_RE = re.compile(r'^\w+$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var clickmapConfig = {tracker: '%(tracker_id)s', version:'2'};
|
var clickmapConfig = {tracker: '%(tracker_id)s', version:'2'};
|
||||||
window.clickmapAsyncInit = function(){ __clickmap.init(clickmapConfig); };
|
window.clickmapAsyncInit = function(){ __clickmap.init(clickmapConfig); };
|
||||||
(function() { var _cmf = document.createElement('script'); _cmf.async = true;
|
(function() { var _cmf = document.createElement('script'); _cmf.async = true;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ from analytical.utils import (
|
||||||
|
|
||||||
SITE_ID_RE = re.compile(r'^\d+$')
|
SITE_ID_RE = re.compile(r'^\d+$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var clicky = { log: function(){ return; }, goal: function(){ return; }};
|
var clicky = { log: function(){ return; }, goal: function(){ return; }};
|
||||||
var clicky_site_ids = clicky_site_ids || [];
|
var clicky_site_ids = clicky_site_ids || [];
|
||||||
clicky_site_ids.push(%(site_id)s);
|
clicky_site_ids.push(%(site_id)s);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ from django.template import Library, Node, TemplateSyntaxError
|
||||||
from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
||||||
|
|
||||||
ACCOUNT_NUMBER_RE = re.compile(r'^\d+$')
|
ACCOUNT_NUMBER_RE = re.compile(r'^\d+$')
|
||||||
SETUP_CODE = '<script type="text/javascript" src="{placeholder_url}"></script>'.format(
|
SETUP_CODE = '<script src="{placeholder_url}"></script>'.format(
|
||||||
placeholder_url='//dnn506yrbagrg.cloudfront.net/pages/scripts/'
|
placeholder_url='//dnn506yrbagrg.cloudfront.net/pages/scripts/'
|
||||||
'%(account_nr_1)s/%(account_nr_2)s.js'
|
'%(account_nr_1)s/%(account_nr_2)s.js'
|
||||||
)
|
)
|
||||||
|
|
@ -58,7 +58,7 @@ class CrazyEggNode(Node):
|
||||||
}
|
}
|
||||||
for (varnr, value) in params
|
for (varnr, value) in params
|
||||||
)
|
)
|
||||||
html = '%s\n<script type="text/javascript">%s</script>' % (html, js)
|
html = '%s\n<script>%s</script>' % (html, js)
|
||||||
if is_internal_ip(context, 'CRAZY_EGG'):
|
if is_internal_ip(context, 'CRAZY_EGG'):
|
||||||
html = disable_html(html, 'Crazy Egg')
|
html = disable_html(html, 'Crazy Egg')
|
||||||
return html
|
return html
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
||||||
|
|
||||||
SITE_ID_RE = re.compile(r'[\da-f]+$')
|
SITE_ID_RE = re.compile(r'[\da-f]+$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _gauges = _gauges || [];
|
var _gauges = _gauges || [];
|
||||||
(function() {
|
(function() {
|
||||||
var t = document.createElement('script');
|
var t = document.createElement('script');
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ SCOPE_PAGE = 3
|
||||||
|
|
||||||
PROPERTY_ID_RE = re.compile(r'^UA-\d+-\d+$')
|
PROPERTY_ID_RE = re.compile(r'^UA-\d+-\d+$')
|
||||||
SETUP_CODE = """
|
SETUP_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
|
|
||||||
var _gaq = _gaq || [];
|
var _gaq = _gaq || [];
|
||||||
_gaq.push(['_setAccount', '%(property_id)s']);
|
_gaq.push(['_setAccount', '%(property_id)s']);
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ from analytical.utils import (
|
||||||
|
|
||||||
TOKEN_RE = re.compile(r'^\S+-\S+-\S+$')
|
TOKEN_RE = re.compile(r'^\S+-\S+-\S+$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var GoSquared={};
|
var GoSquared={};
|
||||||
%(config)s
|
%(config)s
|
||||||
(function(w){
|
(function(w){
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,8 @@ from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
||||||
|
|
||||||
HEAP_TRACKER_ID_RE = re.compile(r'^\d+$')
|
HEAP_TRACKER_ID_RE = re.compile(r'^\d+$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.heapanalytics.com/js/heap-"+e+".js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],o=0;o<p.length;o++)heap[p[o]]=n(p[o])};
|
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.heapanalytics.com/js/heap-"+e+".js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],o=0;o<p.length;o++)heap[p[o]]=n(p[o])};
|
||||||
heap.load("%(tracker_id)s");
|
heap.load("%(tracker_id)s");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
||||||
PORTAL_ID_RE = re.compile(r'^\d+$')
|
PORTAL_ID_RE = re.compile(r'^\d+$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<!-- Start of Async HubSpot Analytics Code -->
|
<!-- Start of Async HubSpot Analytics Code -->
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
(function(d,s,i,r) {
|
(function(d,s,i,r) {
|
||||||
if (d.getElementById(i)){return;}
|
if (d.getElementById(i)){return;}
|
||||||
var n=d.createElement(s),e=d.getElementsByTagName(s)[0];
|
var n=d.createElement(s),e=d.getElementsByTagName(s)[0];
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ from analytical.utils import get_identity, get_required_setting
|
||||||
ACCOUNT_NUMBER_RE = re.compile(r'^\d+$')
|
ACCOUNT_NUMBER_RE = re.compile(r'^\d+$')
|
||||||
SITE_CODE_RE = re.compile(r'^[\w]+$')
|
SITE_CODE_RE = re.compile(r'^[\w]+$')
|
||||||
SETUP_CODE = """
|
SETUP_CODE = """
|
||||||
<script type="text/javascript">var _kiq = _kiq || []; %(commands)s</script>
|
<script>var _kiq = _kiq || []; %(commands)s</script>
|
||||||
<script type="text/javascript" src="//s3.amazonaws.com/ki.js/%(account_number)s/%(site_code)s.js" async="true"></script>
|
<script src="//s3.amazonaws.com/ki.js/%(account_number)s/%(site_code)s.js" async="true"></script>
|
||||||
""" # noqa
|
""" # noqa
|
||||||
IDENTIFY_CODE = "_kiq.push(['identify', '%s']);"
|
IDENTIFY_CODE = "_kiq.push(['identify', '%s']);"
|
||||||
SHOW_SURVEY_CODE = "_kiq.push(['showSurvey', %s]);"
|
SHOW_SURVEY_CODE = "_kiq.push(['showSurvey', %s]);"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ from analytical.utils import (
|
||||||
|
|
||||||
API_KEY_RE = re.compile(r'^[0-9a-f]{40}$')
|
API_KEY_RE = re.compile(r'^[0-9a-f]{40}$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _kmq = _kmq || [];
|
var _kmq = _kmq || [];
|
||||||
%(commands)s
|
%(commands)s
|
||||||
function _kms(u){
|
function _kms(u){
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ DOMAINPATH_RE = re.compile(r'^(([^./?#@:]+\.)*[^./?#@:]+)+(:[0-9]+)?(/[^/?#@:]+)
|
||||||
SITEID_RE = re.compile(r'^\d+$')
|
SITEID_RE = re.compile(r'^\d+$')
|
||||||
|
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _paq = window._paq || [];
|
var _paq = window._paq || [];
|
||||||
%(variables)s
|
%(variables)s
|
||||||
%(commands)s
|
%(commands)s
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ from analytical.utils import (
|
||||||
|
|
||||||
MIXPANEL_API_TOKEN_RE = re.compile(r'^[0-9a-f]{32}$')
|
MIXPANEL_API_TOKEN_RE = re.compile(r'^[0-9a-f]{32}$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===e.location.protocol?"https:":"http:")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==
|
<script>(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===e.location.protocol?"https:":"http:")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==
|
||||||
typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,
|
typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,
|
||||||
e,d])};b.__SV=1.2}})(document,window.mixpanel||[]);
|
e,d])};b.__SV=1.2}})(document,window.mixpanel||[]);
|
||||||
mixpanel.init('%(token)s');
|
mixpanel.init('%(token)s');
|
||||||
|
|
|
||||||
|
|
@ -16,17 +16,17 @@ from analytical.utils import (
|
||||||
|
|
||||||
API_KEY_RE = re.compile(r'^\w+$')
|
API_KEY_RE = re.compile(r'^\w+$')
|
||||||
SETUP_CODE = """
|
SETUP_CODE = """
|
||||||
<script src="//d1nu2rn22elx8m.cloudfront.net/performable/pax/%(api_key)s.js" type="text/javascript"></script>
|
<script src="//d1nu2rn22elx8m.cloudfront.net/performable/pax/%(api_key)s.js"></script>
|
||||||
""" # noqa
|
""" # noqa
|
||||||
IDENTIFY_CODE = """
|
IDENTIFY_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _paq = _paq || [];
|
var _paq = _paq || [];
|
||||||
_paq.push(["identify", {identity: "%s"}]);
|
_paq.push(["identify", {identity: "%s"}]);
|
||||||
</script>
|
</script>
|
||||||
"""
|
"""
|
||||||
EMBED_CODE = """
|
EMBED_CODE = """
|
||||||
<script type="text/javascript" src="//d1nu2rn22elx8m.cloudfront.net/performable/embed/page.js"></script>
|
<script src="//d1nu2rn22elx8m.cloudfront.net/performable/embed/page.js"></script>
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
var $f = new PerformableEmbed();
|
var $f = new PerformableEmbed();
|
||||||
$f.initialize({'host': '%(hostname)s', 'page': '%(page_id)s'});
|
$f.initialize({'host': '%(hostname)s', 'page': '%(page_id)s'});
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
||||||
|
|
||||||
COUNTER_ID_RE = re.compile(r'^\d{7}$')
|
COUNTER_ID_RE = re.compile(r'^\d{7}$')
|
||||||
COUNTER_CODE = """
|
COUNTER_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _tmr = window._tmr || (window._tmr = []);
|
var _tmr = window._tmr || (window._tmr = []);
|
||||||
_tmr.push({id: "%(counter_id)s", type: "pageView", start: (new Date()).getTime()});
|
_tmr.push({id: "%(counter_id)s", type: "pageView", start: (new Date()).getTime()});
|
||||||
(function (d, w, id) {
|
(function (d, w, id) {
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ WIDGET_ID_RE = re.compile(
|
||||||
r'^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$'
|
r'^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$'
|
||||||
)
|
)
|
||||||
SETUP_CODE = """
|
SETUP_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
document.write(unescape("%%3Cscript src='" + ((document.location.protocol=="https:")?"https://snapabug.appspot.com":"http://www.snapengage.com") + "/snapabug.js' type='text/javascript'%%3E%%3C/script%%3E"));</script><script type="text/javascript">
|
document.write(unescape("%%3Cscript src='" + ((document.location.protocol=="https:")?"https://snapabug.appspot.com":"http://www.snapengage.com") + "/snapabug.js' type='text/javascript'%%3E%%3C/script%%3E"));</script><script>
|
||||||
%(settings_code)s
|
%(settings_code)s
|
||||||
</script>
|
</script>
|
||||||
""" # noqa
|
""" # noqa
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ from analytical.utils import get_identity, get_required_setting
|
||||||
|
|
||||||
WIDGET_KEY_RE = re.compile(r'^[a-zA-Z0-9]*$')
|
WIDGET_KEY_RE = re.compile(r'^[a-zA-Z0-9]*$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
|
|
||||||
UserVoice=window.UserVoice||[];(function(){
|
UserVoice=window.UserVoice||[];(function(){
|
||||||
var uv=document.createElement('script');uv.type='text/javascript';
|
var uv=document.createElement('script');uv.type='text/javascript';
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ from analytical.utils import (
|
||||||
|
|
||||||
DOMAIN_RE = re.compile(r'^\S+$')
|
DOMAIN_RE = re.compile(r'^\S+$')
|
||||||
TRACKING_CODE = """
|
TRACKING_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var woo_settings = %(settings)s;
|
var woo_settings = %(settings)s;
|
||||||
var woo_visitor = %(visitor)s;
|
var woo_visitor = %(visitor)s;
|
||||||
!function(){var a,b,c,d=window,e=document,f=arguments,g="script",h=["config","track","trackForm","trackClick","identify","visit","push","call"],i=function(){var a,b=this,c=function(a){b[a]=function(){return b._e.push([a].concat(Array.prototype.slice.call(arguments,0))),b}};for(b._e=[],a=0;a<h.length;a++)c(h[a])};for(d.__woo=d.__woo||{},a=0;a<f.length;a++)d.__woo[f[a]]=d[f[a]]=d[f[a]]||new i;b=e.createElement(g),b.async=1,b.src="//static.woopra.com/js/w.js",c=e.getElementsByTagName(g)[0],c.parentNode.insertBefore(b,c)}("woopra");
|
!function(){var a,b,c,d=window,e=document,f=arguments,g="script",h=["config","track","trackForm","trackClick","identify","visit","push","call"],i=function(){var a,b=this,c=function(a){b[a]=function(){return b._e.push([a].concat(Array.prototype.slice.call(arguments,0))),b}};for(b._e=[],a=0;a<h.length;a++)c(h[a])};for(d.__woo=d.__woo||{},a=0;a<f.length;a++)d.__woo[f[a]]=d[f[a]]=d[f[a]]||new i;b=e.createElement(g),b.async=1,b.src="//static.woopra.com/js/w.js",c=e.getElementsByTagName(g)[0],c.parentNode.insertBefore(b,c)}("woopra");
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ from analytical.utils import disable_html, get_required_setting, is_internal_ip
|
||||||
|
|
||||||
COUNTER_ID_RE = re.compile(r'^\d{8}$')
|
COUNTER_ID_RE = re.compile(r'^\d{8}$')
|
||||||
COUNTER_CODE = """
|
COUNTER_CODE = """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
(function (d, w, c) {
|
(function (d, w, c) {
|
||||||
(w[c] = w[c] || []).push(function() {
|
(w[c] = w[c] || []).push(function() {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ site id by clicking the *Tracking Code* link when logged into
|
||||||
the on the gaug.es website. A page will display containing
|
the on the gaug.es website. A page will display containing
|
||||||
HTML code looking like this::
|
HTML code looking like this::
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _gauges = _gauges || [];
|
var _gauges = _gauges || [];
|
||||||
(function() {
|
(function() {
|
||||||
var t = document.createElement('script');
|
var t = document.createElement('script');
|
||||||
|
|
@ -88,6 +88,6 @@ Internal IP addresses
|
||||||
Usually you do not want to track clicks from your development or
|
Usually you do not want to track clicks from your development or
|
||||||
internal IP addresses. By default, if the tags detect that the client
|
internal IP addresses. By default, if the tags detect that the client
|
||||||
comes from any address in the :const:`ANALYTICAL_INTERNAL_IPS` setting
|
comes from any address in the :const:`ANALYTICAL_INTERNAL_IPS` setting
|
||||||
(which is :const:`INTERNAL_IPS` by default,) the tracking code is
|
(which is :const:`INTERNAL_IPS` by default,) the tracking code is
|
||||||
commented out. See :ref:`identifying-visitors` for important information
|
commented out. See :ref:`identifying-visitors` for important information
|
||||||
about detecting the visitor IP address.
|
about detecting the visitor IP address.
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ find the Javascript embed code of the widget. The widget key is the
|
||||||
alphanumerical string contained in the URL of the script imported by the
|
alphanumerical string contained in the URL of the script imported by the
|
||||||
embed code::
|
embed code::
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
|
|
||||||
UserVoice=window.UserVoice||[];(function(){
|
UserVoice=window.UserVoice||[];(function(){
|
||||||
var uv=document.createElement('script');uv.type='text/javascript';
|
var uv=document.createElement('script');uv.type='text/javascript';
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class GaugesTagTestCase(TagTestCase):
|
||||||
assert (
|
assert (
|
||||||
self.render_tag('gauges', 'gauges')
|
self.render_tag('gauges', 'gauges')
|
||||||
== """
|
== """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _gauges = _gauges || [];
|
var _gauges = _gauges || [];
|
||||||
(function() {
|
(function() {
|
||||||
var t = document.createElement('script');
|
var t = document.createElement('script');
|
||||||
|
|
@ -42,7 +42,7 @@ class GaugesTagTestCase(TagTestCase):
|
||||||
assert (
|
assert (
|
||||||
GaugesNode().render(Context())
|
GaugesNode().render(Context())
|
||||||
== """
|
== """
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
var _gauges = _gauges || [];
|
var _gauges = _gauges || [];
|
||||||
(function() {
|
(function() {
|
||||||
var t = document.createElement('script');
|
var t = document.createElement('script');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue