Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Elliott Grieco authored Oct 16, 2018
1 parent 20e6b32 commit a826d25
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ You'll need to configure the module by passing it an object as an angular `const
```html
<head>
<!-- ... -->
<!-- googleAnalyticsConfig.externaLScriptUrl -->
<script async src="https://www.googletagmanager.com/gtag/js?id={trackingId}"></script>

<!-- googleAnalyticsConfig.inlineScript -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
Expand Down Expand Up @@ -111,3 +108,21 @@ app.constant('googleAnalyticsConfig', {
`
})
```
output:
```html
<head>
<!-- ... -->
<!-- or, if included: <script async src="{externalScriptURL}"></script> -->
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'AB-123456789']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
```

0 comments on commit a826d25

Please sign in to comment.