Skip to content

Commit

Permalink
Merge pull request #916 from taka-sho/feature/examples/linker-with-gtm
Browse files Browse the repository at this point in the history
add(examples/linker-plugin/) example with GTM
  • Loading branch information
shoota authored Dec 14, 2018
2 parents d4b6b8a + fa43024 commit 4d6ffb6
Show file tree
Hide file tree
Showing 4 changed files with 1,535 additions and 1,490 deletions.
5 changes: 3 additions & 2 deletions examples/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@ html
a.list-group-item(href='/agent.js/simple/events.html') Send events
.list-group
a.list-group-item(href='#advanced', data-toggle="collapse")
span.badge 4
span.badge 5
| Advanced Usage Examples
#advanced.panel-collapse.collapse
.panel-body
.list-group.list-group-flush
a.list-group-item(href='/agent.js/simple/page.html') Override location
a.list-group-item(href='/agent.js/plugin-linker/') Cross-domain using query parameter - with anchor tag
a.list-group-item(href='/agent.js/plugin-linker/area.html') Cross-domain using query parameter - with area tag
a.list-group-item(href='/agent.js/plugin-linker/linker-with-gtm.html') Cross-domain using query parameter - with anchor tag and Google Tag Manager
a.list-group-item(href='/agent.js/plugin-linker/area.html') Cross-domain using query parameter - with area tag and Google Tag Manager
a.list-group-item(href='/agent.js/with-google-tag-manager/') Use with Google Tag Manager
a.list-group-item(href='#spa', data-toggle="collapse")
span.badge 4
Expand Down
2 changes: 1 addition & 1 deletion examples/plugin-linker/area.pug
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ block loader
// End Google Tag Manager
block breadcrumb-current
li.active Cross-domain using query parameter via area tag - with area tag
li.active Cross-domain using query parameter - with area tag and Google Tag Manager

block content
map(name='example')
Expand Down
19 changes: 19 additions & 0 deletions examples/plugin-linker/linker-with-gtm.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
extends ../index.pug

block loader
// Google Tag Manager
noscript
iframe(src='//www.googletagmanager.com/ns.html?id=GTM-WKDF5D', height='0', width='0', style='display:none;visibility:hidden')
script.
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TLLGLZF');
// End Google Tag Manager
block breadcrumb-current
li.active Cross-domain using query parameter - with anchor tag and Google Tag Manager

block content
include:markdown-it README.md
Loading

0 comments on commit 4d6ffb6

Please sign in to comment.