File tree Expand file tree Collapse file tree 2 files changed +3
-20
lines changed
Expand file tree Collapse file tree 2 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ var Parsely = (module.exports = integration('Parsely')
2121 . option ( 'dynamicTracking' , false )
2222 . option ( 'trackEvents' , false )
2323 . option ( 'inPixelMetadata' , false )
24- . tag ( '<script src="//d1z2jf7jlzjs58.cloudfront.net/p.js">' ) ) ;
24+ . tag (
25+ '<script id="parsely-cfg" src="//cdn.parsely.com/keys/{{ apikey }}/p.js">'
26+ ) ) ;
2527
2628/**
2729 * Initialize.
@@ -33,14 +35,6 @@ Parsely.prototype.initialize = function() {
3335 if ( this . options . dynamicTracking ) window . PARSELY . autotrack = false ;
3436 var self = this ;
3537
36- // append the meta tag we need first before JS fires
37- var meta = document . createElement ( 'meta' ) ;
38- meta . id = 'parsely-cfg' ;
39- meta . setAttribute ( 'data-parsely-site' , this . options . apiKey ) ;
40- var head = document . getElementsByTagName ( 'head' ) [ 0 ] ;
41- if ( ! head ) return ;
42- head . appendChild ( meta ) ;
43-
4438 this . load ( function ( ) {
4539 when ( self . loaded , self . ready ) ;
4640 } ) ;
Original file line number Diff line number Diff line change @@ -55,17 +55,6 @@ describe('Parsely', function() {
5555 analytics . stub ( parsely , 'load' ) ;
5656 } ) ;
5757
58- it ( 'should create a Parsely meta tag' , function ( ) {
59- var isLoaded = function ( ) {
60- return ! ! filter ( document . getElementsByTagName ( 'meta' ) , isParselyMetaTag )
61- . length ;
62- } ;
63-
64- analytics . assert ( ! isLoaded ( ) ) ;
65- parsely . initialize ( ) ;
66- analytics . assert ( isLoaded ( ) ) ;
67- } ) ;
68-
6958 it ( 'should set window.PARSELY if not already set' , function ( ) {
7059 analytics . assert ( window . PARSELY === undefined ) ;
7160 analytics . initialize ( ) ;
You can’t perform that action at this time.
0 commit comments