mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
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.
This commit is contained in:
parent
16d9fdcf6c
commit
aa0edc9f6c
@ -30,7 +30,7 @@ To start tracking, include the following JavaScript on your site and replace `yo
|
|||||||
};
|
};
|
||||||
o=f.createElement('script'),
|
o=f.createElement('script'),
|
||||||
m=f.getElementsByTagName('script')[0];
|
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)
|
m.parentNode.insertBefore(o,m)
|
||||||
})(document, window, '//yourfathom.com/tracker.js', 'fathom');
|
})(document, window, '//yourfathom.com/tracker.js', 'fathom');
|
||||||
fathom('trackPageview');
|
fathom('trackPageview');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user