Viewing 1 replies (of 1 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    In Enhanced Ecommerce there are several so called dataLayer variables utilized in which my plugin sends details about what is happening on the site to Analytics through GTM. This also includes the event when a purchase has been made.

    For Facebook tracking simply create a Custom HTML Tag and copy/paste the code provided by Facebook into this and create a trigger (aka. rule) for your “order received” URL.
    You may also create a new variable (aka. macro) inside GTM with type “Data Layer Variable” and set the variable name to ecommerce.purchase.actionField.revenue if you are using Enhanced Ecommerce tracking.

    In your FB code there is this line:

    window._fbq.push(['track', '8888888888', {'value':'0.00','currency':'USD'}]);

    In place of 0.00 put this new dataLayer variable using the name you provided during creation. Lets say you named you new macro as ‘revenue’, in this case your code should look like this:

    window._fbq.push(['track', '8888888888', {'value':'{{revenue}}','currency':'USD'}]);

    Using this you will also able to track conversion values not just events itself.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding Facebook Conversion Pixels for Woocommerce’ is closed to new replies.