Skip to content

Commit

Permalink
Add filter for power users who wants to use their own standar pagevie…
Browse files Browse the repository at this point in the history
…w tracking
  • Loading branch information
roykho committed Aug 2, 2019
1 parent 0c4ed43 commit 5286c2b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
19 changes: 16 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
.gitattributes export-ignore
.gitmodules export-ignore
.gitignore export-ignore
deploy-to-wp-org.sh export-ignore
.github export-ignore
bin export-ignore
tests export-ignore
.travis.yml export-ignore
Gruntfile.js export-ignore
README.md export-ignore
package.json export-ignore
package-lock.json export-ignore
composer.json export-ignore
phpunit.xml.dist export-ignore
phpunit.xml export-ignore
.eslintrc export-ignore
.eslintignore export-ignore
.tx export-ignore
codecov.yml export-ignore
.editorconfig export-ignore
.jshintrc export-ignore
.phpcs.xml export-ignore
.travis.yml export-ignore
.editorconfig export-ignore
.babelrc export-ignore
docs export-ignore
wordpress_org_assets export-ignore
assets/css/*.scss export-ignore
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** Changelog ***

= 1.4.11 - 2019-08-01 =
= 1.4.11 - 2019-08-02 =
* Add - Filter to bypass "send pageview" for users whom want to use separate standard GA. `wc_goole_analytics_send_pageview`.
* Fix - Revert last release due to it causing ecommerce tracking to be disabled when standard tracking is disabled.

= 1.4.10 - 2019-07-10 =
Expand Down
4 changes: 3 additions & 1 deletion includes/class-wc-google-analytics-js.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ public static function classic_analytics_footer() {
* Sends the pageview last thing (needed for things like addImpression)
*/
public static function universal_analytics_footer() {
wc_enqueue_js( "" . self::tracker_var() . "( 'send', 'pageview' ); " );
if ( apply_filters( 'wc_goole_analytics_send_pageview', true ) ) {
wc_enqueue_js( "" . self::tracker_var() . "( 'send', 'pageview' ); " );
}
}

/**
Expand Down
3 changes: 2 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Exact wording depends on the national data privacy laws and should be adjusted.

== Changelog ==

= 1.4.11 - 2019-08-01 =
= 1.4.11 - 2019-08-02 =
* Add - Filter to bypass "send pageview" for users whom want to use separate standard GA. `wc_goole_analytics_send_pageview`.
* Fix - Revert last release due to it causing ecommerce tracking to be disabled when standard tracking is disabled.

= 1.4.10 - 2019-07-10 =
Expand Down

0 comments on commit 5286c2b

Please sign in to comment.