• Lucius

    (@allenraysales)


    I’m trying to add Google Reviews into our e-commerce website and it requires 3 additional variables that doesn’t appear to be in the datalayer.

    These are countrycode, customeremail, and shipdate.

    Is there a way to easily push them to the datalayer? customeremail appears to be setup already as it is displaying but with no email value when we use a guest checkout (not logged in) process.

    Info on this is appreciated.

    Thanks,

    Al

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

    (@duracelltomi)

    Hi,

    The next version of the plugin will include most of this data except for order delivery date. With the next plugin version on the order received page, you will have several new variables to use:

    – customerBillingCountry or customerShippingCountry
    – customerBillingEmail

    Order delivery date is usually an average, you may want to generate this by yourself based on the current date and adding an average number of days.

    I hope that helps.

    Thread Starter Lucius

    (@allenraysales)

    Much appreciated for your time and dedication to this plugin! Very excited for this update.

    Cheers,

    Allen

    Hi @allenraysales,

    When you talk of Ship date, are you using a plugin like the Order Delivery Date? We are the authors of that plugin, hence the question.

    @duracelltomi, I would be happy to integrate our plugin with yours, so it can show the Order delivery date from our plugin on the order received page.

    Please let me know if there is a guide or instructions that we should follow in order to make the integration.

    :Vishal

    Thread Starter Lucius

    (@allenraysales)

    Thanks Vishal will check this out.

    Cheers,

    Al

    Plugin Author Thomas Geiger

    (@duracelltomi)

    @ashokrane that is quite easy, use the GTM4WP_WPFILTER_COMPILE_DATALAYER constant or reference directly the gtm4wp_compile_datalayer filter name to hook into the data layer building process.

    If the user is on the order received page, you can use this filter to add the order delivery date if my plugin is active:

    
    function your_datalayer_hook( $dataLayer ) {
      $dataLayer["orderDeliveryDate"] = "your value";
    
      return $dataLayer;
    }
    add_filter( GTM4WP_WPFILTER_COMPILE_DATALAYER, "your_datalayer_hook" );
    

    Does this help?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Include custom variable in Datalayer’ is closed to new replies.