Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit 807b2be

Browse files
Merge pull request #2 from justinribeiro/docs-upd
Fix wrong 2.x example
2 parents e4846dd + aa1ee95 commit 807b2be

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ If not using the `pageview` property to send a ping to GA, you can use the `send
6666

6767
```javascript
6868
// via Polymer 2.x
69+
this.shadowRoot.querySelector('ga-dnt-analytics').send({
70+
hitType: 'pageview',
71+
page: window.location.pathname,
72+
location: window.location.href,
73+
title: 'My Title'
74+
});
75+
76+
// via Polymer 1.x
6977
this.$$('ga-dnt-analytics').send({
7078
hitType: 'pageview',
7179
page: window.location.pathname,

0 commit comments

Comments
 (0)