Twitter pixel not working in Shopify's checkout_completed event trigger

27 0 3

Hey guys, I've put this block of code inside custom pixel section on Shopify, but my client keeps telling me that the event is not triggering inside twitter:



twq("config", "twitter_id");

analytics.subscribe("checkout_completed", event => {
  twq('event', 'event_id', {
    value: event.checkout.totalPrice.amount,
    currency: event.checkout.currencyCode,
    email_address: || null,

Am I doing something wrong? twitter_id and event_id are hidden for privacy/security reasons.

Should I be passing conversion_id as well for it work? If so, how do I get it from event object? 

Replies 2 (2)

Shopify Partner
1 0 0

I don't believe the variables you've used in your code are going to work.


Use this instead:

analytics.subscribe("checkout_completed", (event) => {
  twq('event', 'event_id', {


Also, you can swap subtotalPrice for totalPrice in my example code.

New Member
5 0 0

Is there a trick to get this to "connect"? My connect button is not active with this code and my twitter id and event id