From aa0edc9f6cab4df52f0bc2ca8ee1ea2fe9919315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Heym=C3=A8s?= Date: Thu, 17 May 2018 14:01:52 +0200 Subject: [PATCH] Fix missing script id attribute in README When `setTrackerUrl` method is not called before `trackPageView`, the tracker will [try to find its location](https://github.com/lovethebomb/fathom/blob/master/assets/js/tracker.js#L46-L49) based on the script element with id attribute of `fathom-script`. This id attribute was missing in the README snippet. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d6ecccc..5e8fa41 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ To start tracking, include the following JavaScript on your site and replace `yo }; o=f.createElement('script'), m=f.getElementsByTagName('script')[0]; - o.async=1; o.src=t; + o.async=1; o.src=t; o.id='fathom-script'; m.parentNode.insertBefore(o,m) })(document, window, '//yourfathom.com/tracker.js', 'fathom'); fathom('trackPageview');