Skip to content

Commit

Permalink
Merge pull request #370 from workeffortwaste/remove-tracker-exists-check
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalec authored Mar 7, 2024
2 parents 9d7c1e6 + 6baa840 commit 7594c1b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions assets/js/src/tracker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ class Tracker {
throw new Error( 'Cannot instantiate more than one Tracker' );
}
instance = this;
instance.init();
}

/**
* Initializes the tracker and dataLayer if not already done.
*/
init() {
if ( window[ config.tracker_function_name ] ) {
// Tracker already initialized. Do nothing.
return;
}

window.dataLayer = window.dataLayer || [];

Expand Down

0 comments on commit 7594c1b

Please sign in to comment.