Skip to content

Commit

Permalink
Update google_codelab_analytics.js
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonCent authored Jun 22, 2023
1 parent 4d5855f commit 0df4e0f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ class CodelabAnalytics extends HTMLElement {
// First, set the GTAG data layer before pushing anything to it.
window[CODELAB_DATA_LAYER] = window[CODELAB_DATA_LAYER] || [];

const firstScriptElement = document.getElementsByTagName('script')[0];
const firstScriptElement = document.querySelector('script');
const gtagScriptElement = /** @type {!HTMLScriptElement} */ (
document.createElement('script'));
gtagScriptElement.async = true;
Expand Down

0 comments on commit 0df4e0f

Please sign in to comment.