Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Woocommerce integration when Ecommerce Revenue tracking is enabled. #214

Merged
merged 32 commits into from
Jun 7, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
45dc157
Added: track WooCommerce purchases on thank you page.
Dan0sz May 23, 2024
40dd735
Fixed: make sure purchases aren't tracked twice.
Dan0sz May 23, 2024
4839f36
Fixed: track Add to cart and Remove cart item events.
Dan0sz May 23, 2024
e78ff71
Improved: assure our HTTP response code is returned when using the Pr…
Dan0sz May 24, 2024
23ff680
Ignore safety check.
Dan0sz May 24, 2024
d17d982
Added: track entered checkout event.
Dan0sz May 24, 2024
d9a6151
Remove Babel, since we no longer need it.
Dan0sz May 28, 2024
d16c141
Fixed: assure that the _wp_http_referer header is always available wh…
Dan0sz May 28, 2024
9a85fad
Fixed: re-factored Custom Properties to be sent, so they're properly …
Dan0sz May 29, 2024
93444fd
Fixed: re-factored add_to_cart_on_product_page so quantity and other …
Dan0sz May 30, 2024
c97104d
Fixed: is_api_token_valid() would return true when in some situations…
Dan0sz May 31, 2024
6f3039b
Fixed: make sure get_domain() returns current options are used if cur…
Dan0sz May 31, 2024
9114820
Improved: logic of previous fix should be moved to get_settings()
Dan0sz May 31, 2024
04fb33a
Fixed: track AJAX (i.e. non-interactivity API) add to cart events for…
Dan0sz Jun 1, 2024
7a60dfa
Fixed: ID and Product Name weren't properly tracked on product overvi…
Dan0sz Jun 1, 2024
193445f
Improved: only store valid API tokens in DB.
Dan0sz Jun 4, 2024
ed6e0ba
Removed order_id and customer_id from custom properties, due to GDPR …
Dan0sz Jun 5, 2024
c232c1a
PHPDoc.
Dan0sz Jun 5, 2024
06c4e65
Removed transaction_id as well.
Dan0sz Jun 5, 2024
3b77e51
Ignore safety measures and untestable code.
Dan0sz Jun 6, 2024
25faee6
This code won't be tested here.
Dan0sz Jun 6, 2024
6441a35
There's no reason to assume this would fail.
Dan0sz Jun 7, 2024
845b9ae
Added: plausible_analytics_integrations_* filters.
Dan0sz Jun 7, 2024
0890bdd
Added: testGetPostSettings and expanded testGetFilename
Dan0sz Jun 7, 2024
3b493b8
Prevent duplicate test values.
Dan0sz Jun 7, 2024
4bea534
Added: testMaybeCreateWooCommerceGoals()
Dan0sz Jun 7, 2024
e998df2
Added: WooComerceTest
Dan0sz Jun 7, 2024
bf9a776
PHPDoc.
Dan0sz Jun 7, 2024
913ffa8
PHPDoc.
Dan0sz Jun 7, 2024
0197831
Ignore AddJS
Dan0sz Jun 7, 2024
698b592
No need to modify source code.
Dan0sz Jun 7, 2024
98f360f
Minor re-factor for readability.
Dan0sz Jun 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improved: only store valid API tokens in DB.
  • Loading branch information
Dan0sz committed Jun 4, 2024
commit 193445feb9c285b3951d7ab8932d2f88fe899480
7 changes: 6 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ public function validate_api_token() {
$token = $this->api_instance->getConfig()->getPassword();
$is_valid = strpos( $token, 'plausible-plugin' ) !== false && ! empty( $features->getGoals() ) && $data_domain === Helpers::get_domain();

set_transient( 'plausible_analytics_valid_token', [ $token => $is_valid ], 86400 );
/**
* Don't cache invalid API tokens.
*/
if ( $is_valid ) {
set_transient( 'plausible_analytics_valid_token', [ $token => true ], 86400 );
}

return $is_valid;
}
Expand Down