Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'auto' to the Google Analytics tracker create method. #1562

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/extend.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ snippet](http://mathiasbynens.be/notes/async-analytics-snippet#universal-analyti
included with HTML5 Boilerplate includes something like this:

```js
ga('create','UA-XXXXX-X'); ga('send','pageview');
ga('create', 'UA-XXXXX-X', 'auto'); ga('send', 'pageview');
```

To customize further, see Google's [Advanced
Expand All @@ -159,7 +159,7 @@ parameter](https://developers.google.com/analytics/devguides/collection/analytic
before sending any events/pagviews. In use it looks like this:

```js
ga('create','UA-XXXXX-X');
ga('create', 'UA-XXXXX-X', 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
```
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
ga('create','UA-XXXXX-X','auto');ga('send','pageview');
</script>
</body>
</html>