Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
derrickreimer committed Mar 11, 2024
1 parent cadb2df commit 343d474
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const checkDomainsAndWarn = (domains: string[]): void => {

export const load = (siteId: string, opts?: LoadOptions): void => {
let tracker = document.createElement('script');

let firstScript =
document.getElementsByTagName('script')[0] ||
document.querySelector('body');
Expand All @@ -117,6 +118,7 @@ export const load = (siteId: string, opts?: LoadOptions): void => {
tracker.setAttribute('data-site', siteId);
tracker.src =
opts && opts.url ? opts.url : 'https://cdn.usefathom.com/script.js';

if (opts) {
if (opts.auto !== undefined)
tracker.setAttribute('data-auto', `${opts.auto}`);
Expand Down Expand Up @@ -221,7 +223,7 @@ export const enableTrackingForMe = (): void => {
};

/**
* Checks if tracking is enabled for the current vistior
* Checks if tracking is enabled for the current visitor.
*/
export const isTrackingEnabled = (): boolean => {
const preferenceStorage: string | null = localStorage.getItem(
Expand Down

0 comments on commit 343d474

Please sign in to comment.