Skip to content

Commit

Permalink
Some improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Apr 28, 2017
1 parent e7cd9dd commit 635aad7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Save Analytics From Content Blockers

A repository with code sample for my Medium article (will be released soon).
A repository with demo application for my Medium article "Save Your Analytics from Content Blockers"
(will be released soon).

You can use modified analytics script directly from GitHub pages (until it appears in ad-blockers
filter):

```html
<script>
(function(i,s,o,r){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date()})(window,document,'script','ga');
ga('create', 'UA-12345678-1', 'auto'); // replace this tracking code with your one
ga('send', 'pageview');
</script>
<script src="https://zitros.github.io/save-analytics-from-content-blockers/analytics.js" async></script>
```

Testing
-------
Expand Down
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
<head>
<meta charset="UTF-8">
<title>Google Analytics Content-Blockers-Free Test</title>
<script src="/analytics.js"></script>
<script>
(function(i,s,o,r){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date()})(window,document,'script','ga');
ga('create', 'UA-98253329-1', 'auto');
ga('send', 'pageview');
</script>
<script src="/analytics.js" async></script>
</head>
<body>
Hello! Now check the Network tab in Developer Tools ;)
Expand Down

0 comments on commit 635aad7

Please sign in to comment.