Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Use @mathiasbynens's GA snippet #61

Merged
merged 1 commit into from
Apr 17, 2015
Merged

Use @mathiasbynens's GA snippet #61

merged 1 commit into from
Apr 17, 2015

Conversation

QWp6t
Copy link
Member

@QWp6t QWp6t commented Apr 5, 2015

@austinpray
Copy link
Contributor

What affect does this have on user timings in GA?

@mathiasbynens
Copy link

@austinpray None.

@QWp6t QWp6t force-pushed the QWp6t branch 3 times, most recently from 76a5246 to feaa703 Compare April 9, 2015 12:05
@QWp6t
Copy link
Member Author

QWp6t commented Apr 17, 2015

I modified this so that it always logs ga() by default. It will only stop logging once analytics.js is loaded. This enabled me to reduce the conditional statement and change the logic of the filter.

  <?php if (apply_filters('soil/loadGA', $loadGA)) : ?>
    <script src="https://www.google-analytics.com/analytics.js" async defer></script>
  <?php endif; ?>

Looks a lot cleaner now, in my opinion. I also decided to throw in s,o,i,l just for kicks.

QWp6t added a commit that referenced this pull request Apr 17, 2015
@QWp6t QWp6t merged commit a3386b9 into master Apr 17, 2015
@QWp6t QWp6t deleted the QWp6t branch April 17, 2015 04:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants