WordPress.org

Ready to get started?Download WordPress

Forums

DuracellTomi's Google Tag Manager for WordPress
[resolved] Insert Adwords Conversion Tracking Value (13 posts)

  1. karmakiss
    Member
    Posted 4 months ago #

    Hi,

    Great plugin - thanks!

    I am trying to insert the Adwords conversion tracking via GTM, but I don't know how to pass the dynamic order value (instead of giving a constant value I would like to have it generated and passed dynamically from my cart to Adwords).

    Any advice on that?

    https://wordpress.org/plugins/duracelltomi-google-tag-manager/

  2. duracelltomi
    Member
    Plugin Author

    Posted 4 months ago #

    Hi,

    What shopping cart plugin are you using?

    Cheers,
    Thomas

  3. karmakiss
    Member
    Posted 4 months ago #

    Hi Thomas and thanks for the quick reply.
    I use Woocommerce.

    Guy

  4. duracelltomi
    Member
    Plugin Author

    Posted 4 months ago #

    Hi Guy,

    In this case enable WooCommerce integration in my plugin. Using this, you will have a GTM event called 'gtm4wp.orderCompleted' when someone completes an order.

    The plugin includes many dataLayer variables so that you can include the order in Google Analytics as a transacion. This includes a dataLayer variable named transactionTotal.

    Use this with a dataLayer macro to include a dynamic value in your AdWords Conversion tag.

    All-in-all:

    #1 Create a rule:
    {{event}} equals 'gtm4wp.orderCompleted'

    #2 Create a macro:
    Macro type: dataLayer variable
    Variable name: transactionTotal

    #3 Create the AW tag:
    Tag type: AdWords conversion tracking
    Conversion ID & label as shown in your AW account
    Conversion value: {{the name of the macro created in #2}}

    I hope this helps.

    Cheers,
    Thomas

  5. karmakiss
    Member
    Posted 4 months ago #

    Thanks Thomas - really helpful.

    Two last quick questions:

    • In the rule creation - do I need to have the event equals 'gtm4wp.orderCompleted' or gtm4wp.orderCompleted?
    • When I create the AW tag -should the firing rule be my thank you page (e.g.: {{url}} starts with http://cityflipflops.com/checkout/order-received) or should it be the event we created in the rule (e.g. {{event}} equals 'gtm4wp.orderCompleted')?

    Thanks again.

    Guy

  6. duracelltomi
    Member
    Plugin Author

    Posted 4 months ago #

    #1 don't include the ' marks, just simply gtm4wp.orderCompleted
    #2 i would suggest to use the event since if the url of your thank you pages changes sometime the event won't.

  7. karmakiss
    Member
    Posted 4 months ago #

    Hey Thomas.

    I enabled the Woocommerce integration on the plugin, and followed your instructions. It still doesn't work.

    Looking at the page source of my thank you page I can't find the transactionTotal variable or the gtm4wp.orderCompleted event.

    The GTM is working. If I am just using a constant value on the Adwords Conversion Tag and fire it on the url it works (but it's not dynamic value).

    You can view the source code of my thank you page here:
    view-source:http://cityflipflops.com/checkout/order-received/2887/?key=wc_order_530cab621d01d&utm_nooverride=1?key=wc_order_530cab621d01d&utm_nooverride=1

    Is there anything I am missing?

  8. duracelltomi
    Member
    Plugin Author

    Posted 4 months ago #

    Hi,

    Transaction data is only included once, just after closing your order. If you reload the page it won't show up.

    I was trying to test this on your site but since the only payment option is PayPal I was not able to close an order.

    Is it possible to enable wire transfer just for some minutes so that I can test this now without paying?

    Thomas

  9. karmakiss
    Member
    Posted 4 months ago #

    I enabled check payment.
    Thanks.

  10. duracelltomi
    Member
    Plugin Author

    Posted 4 months ago #

    Thanks,

    I checked it and it might be a bug.
    I am going to investiage this issue as soon as possible.

  11. karmakiss
    Member
    Posted 4 months ago #

    Thanks so much Thomas. It's been driving me crazy.

    Looking forward to hearing from you.

    Guy

  12. duracelltomi
    Member
    Plugin Author

    Posted 4 months ago #

    Hi Guy,

    I just relased the fix, could you please update and check it?

    Thanks,
    Thomas

  13. karmakiss
    Member
    Posted 4 months ago #

    Works like a charm!

    Thanks so much Thomas.

Reply

You must log in to post.

About this Plugin

About this Topic