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

Problem with the "purchase" event #320

Closed
atoupet-toki opened this issue Jan 30, 2024 · 17 comments · Fixed by #368
Closed

Problem with the "purchase" event #320

atoupet-toki opened this issue Jan 30, 2024 · 17 comments · Fixed by #368

Comments

@atoupet-toki
Copy link

Hello!
We have a problem with the "purchase" event.
Wordpress and all plugins are updated. We have also tested gtm4wp version 1.20-beta.2.
We also followed the tutorials to setup the plugins and the GTM (New empty container, and importing the json container from the tutorial).

We have all events in dataLayer, except "purchase".
We've debugged the plugin code, and it seems that the $order->update_meta_data functions are called before the purchase_datalayer. If we comment out the 2 lines $order->update_meta_data( '_ga_tracked', 1 ); it works. But we can see that .... the 2 lines are after the purchase_datalayer.

We are using Complianz plugin for cookies. But same probleme without this plugin
Has anyone submitted a similar request? Do you need more information to test and validate something? Please let me know.

Thanks in advance

Here is capture of datalayer:
Capture d’écran, le 2024-01-30 à 11 34 39

@duracelltomi
Copy link
Owner

Hi,

In similar cases there was some sort of payment processing plugin that abnormally executed codes normally run once during generating the order received page but in the background. Therefore when the order received page was really loaded, the order was already set to be tracked once.

@takibulislam
Copy link

Hi,
im dealing with the same issue, using default woocommerce checkout and payment processing options, but I have no clue now what exactly happening there,

is there any possible solution?

@duracelltomi
Copy link
Owner

@takibulislam do you have a testing/sandbox/dev version of your site where I can place an order without the need to actually pay for the products?

@takibulislam
Copy link

Hi @duracelltomi
im not a web developer for this website, but I can get a 100% discount code with free shipping so you can avoid paying anything, do you think It will work?

@takibulislam
Copy link

@duracelltomi
i think the info i have provided was incorrect, here is the payment configuration of our website.
image

this is the replay I'v got from the Dev team,

  • it is using Afterpay Gateway for WooCommerce and Square
  • and PayPal Gateway By Payment Plugins

please let me know if you need anything else, appreciate your help

@duracelltomi
Copy link
Owner

Is it working if you select the direct bank transfer during checkout?

@takibulislam
Copy link

takibulislam commented Feb 12, 2024

image
I have just placed an order with Direct Bank transfer, it's not working, unfortunately.

I can provide you with a duplicate version of our website, if you want please let me know how can I send you the info

@takibulislam
Copy link

@duracelltomi
Hello,
we have created a test version of our website, if you want to test I can send you the information. please let me know,

Thank you.

@duracelltomi
Copy link
Owner

Please send details to messenger at gtm4wp dot com. Thanks!

@takibulislam
Copy link

@duracelltomi
I have sent login info to the email you mentioned. I would love to know if there is any update on it.

seems like many people facing the same issue nowadays, hope it will be resolved for all of us.

Thanks for your support and waiting for your response!

@duracelltomi
Copy link
Owner

I received your message. I have a tough day today, it can happen that I will only be able to deep dive tomorrow

@duracelltomi
Copy link
Owner

OK, I was just too curious :-)
When I turn on the following GTM4WP option: 'do not flag orders as being tracked' - the purchase event is there.

It means that for any reason, another plugin is calling codes normally executing while showing the user the order confirmation page. GTM4WP flags the order as being tracked once and when the real order received page is shown, no purhcase event is fired since GTM4WP "sees" that it was already tracked once.

@atoupet-toki
Copy link
Author

This is exactly the same problem I mentioned, but it doesn't seem to me to be related to a payment processing plugin, we don't have the same @takibulislam and me.

@takibulislam
Copy link

@atoupet-toki In my case I also feel like payment processing isn't responsible, I have tried turning off that plugin but still faced the same issue. but I'm not 100% sure.

but anyway I hope Thomas will be able to figure out a decent solution for us.

@duracelltomi
Copy link
Owner

I just want to let you know that I am committed finding a solution to this situation but I have limited time to investigate. I do my best to find a solution as soon as possible.

@atoupet-toki
Copy link
Author

hey @duracelltomi ! Have you found anything to fix the bug?
@takibulislam Do you still have the problem?

@duracelltomi
Copy link
Owner

Hi,

No yet but I had an extremely busy week behind me, most probably I will have time to continue with the investigation next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants