You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
We've recently found on a merchant of ours an issue were the Facebook pixel was firing twice. This was just a regular pixel install by supplying the id in the admin. No custom code.
What I noticed in the shops_events_listeners.js was the parts below:
These are both callbacks for event listeners added by Shopify.
The 2nd will trigger when any of the 4 URLs are called (/cart/{add,change,clear}.js, /cart.js). theme-cart.js naturally uses these.
The 1st get's triggered when a form is submitted that has an action or a href. Naturally, when doing our forms we had them so if Javascript wasn't enabled then we kept the action so they would submit.
We found we could game the 1st event by removing the action so it wouldn't fire.
Is there a better way to manage this?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We've recently found on a merchant of ours an issue were the Facebook pixel was firing twice. This was just a regular pixel install by supplying the id in the admin. No custom code.
What I noticed in the
shops_events_listeners.js
was the parts below:These are both callbacks for event listeners added by Shopify.
The 2nd will trigger when any of the 4 URLs are called (
/cart/{add,change,clear}.js
,/cart.js
).theme-cart.js
naturally uses these.The 1st get's triggered when a form is submitted that has an
action
or ahref
. Naturally, when doing our forms we had them so if Javascript wasn't enabled then we kept the action so they would submit.We found we could game the 1st event by removing the
action
so it wouldn't fire.Is there a better way to manage this?
The text was updated successfully, but these errors were encountered: