Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. // This snippet goes in your tumblr html theme right after you've loaded the analytics.js library.
  2. // Use this to replace analytics.page() in the generic analytics.js library setup code.
  3. // Homepage blog views will be tracked as analytics.page("Blog", "Home"),
  4. // whereas individual post views will be tracked as analytics.page("Blog", "Post") with metadata.
  5. {block:PermalinkPage}
  6. {block:Posts}
  7. {block:Text}
  8. {block:Title}
  9. analytics.page("Blog", "Post", {
  10. postTitle: "{PlaintextTitle}",
  11. postId: {PostID}
  12. });
  13. {/block:Title}
  14. {/block:Text}
  15. {/block:Posts}
  16. {/block:PermalinkPage}
  17. {block:IndexPage}
  18. analytics.page("Blog", "Home");
  19. {/block:IndexPage}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement