File tree Expand file tree Collapse file tree 3 files changed +33
-9
lines changed Expand file tree Collapse file tree 3 files changed +33
-9
lines changed Original file line number Diff line number Diff line change @@ -27,14 +27,10 @@ const config: Config = {
27
27
async : true ,
28
28
} ,
29
29
{
30
- content : `
31
- window.dataLayer = window.dataLayer || [];
32
- function gtag(){dataLayer.push(arguments);}
33
- gtag('js', new Date());
34
- gtag('config', 'G-W02Z2VJYCR', {
35
- debug_mode: ${ process . env . NODE_ENV !== 'production' ? 'true' : 'false' }
36
- });
37
- ` ,
30
+ src : '/gtag-init.js' ,
31
+ } ,
32
+ {
33
+ src : '/pinterest-init.js' ,
38
34
} ,
39
35
] ,
40
36
@@ -289,7 +285,7 @@ const config: Config = {
289
285
} ,
290
286
] ,
291
287
] ,
292
- scripts : [ ] ,
288
+ // scripts: [],
293
289
} ;
294
290
295
291
export default config ;
Original file line number Diff line number Diff line change
1
+ console . log ( '✅ gtag-init.js loaded' ) ;
2
+
3
+ window . dataLayer = window . dataLayer || [ ] ;
4
+ function gtag ( ) { dataLayer . push ( arguments ) ; }
5
+ gtag ( 'js' , new Date ( ) ) ;
6
+ gtag ( 'config' , 'G-W02ZZ2VJYCR' , {
7
+ debug_mode : location . hostname === 'localhost' ? 'true' : 'false'
8
+ } ) ;
Original file line number Diff line number Diff line change
1
+ console . log ( '✅ pinterest-init.js loaded' ) ;
2
+ ! function ( e ) {
3
+ if ( ! window . pintrk ) {
4
+ window . pintrk = function ( ) {
5
+ window . pintrk . queue . push ( Array . prototype . slice . call ( arguments ) ) ;
6
+ } ;
7
+ var n = window . pintrk ;
8
+ n . queue = [ ] , n . version = "3.0" ;
9
+ var t = document . createElement ( "script" ) ;
10
+ t . async = ! 0 ;
11
+ t . src = e ;
12
+ var r = document . getElementsByTagName ( "script" ) [ 0 ] ;
13
+ r . parentNode . insertBefore ( t , r ) ;
14
+ }
15
+ } ( "https://s.pinimg.com/ct/core.js" ) ;
16
+
17
+ pintrk ( 'load' , '2613717138491' , {
18
+ em : 'b58906c504c5638798eb06151e6f49af1b0e4c6c3b5d4f30d9c2268dbe6f9d60' // example hashed email
19
+ } ) ;
20
+ pintrk ( 'page' ) ;
You can’t perform that action at this time.
0 commit comments