Support

Home Forums Event Espresso Premium Variables/terms for Google Ecommerce

Variables/terms for Google Ecommerce

Posted: April 6, 2015 at 1:42 pm

Viewing 1 reply thread


Ray

April 6, 2015 at 1:42 pm

Hi – I’m trying to get Google Enhanced Ecommerce working but I wanted to verify the terms for the codes.

For the registration code, the code is: <?php $registration->e(‘REG_code’) ?>
correct?

But can you tell me what the variable/terms for the Event Name? is it:
<?php $registration->event_name() ?>
or is it
<?php echo htmlentities( $registration->event_name(), ENT_QUOTES, ‘UTF-8’ );?>

So far, I have the following codes and I wanted to make sure it’s correct. Thanks!

//adding items to the thank you page
add_action( ‘AHEE__thank_you_page_payment_details_template__after_payment_details’, ‘GA_ecommerce_code’, 10, 1 );
function GA_ecommerce_code() {
?>
<script type=”text/javascript”>
ga(‘require’, ‘ec’); // Load The Ecommerce Tracking Plugin
// Transaction Details
ga(‘ec:setAction’, ‘purchase’, {
‘id’: , <?php $registration->e(‘REG_code’) ?>,
‘name’: <?php $registration->event_name() ?>
});

</script>
<?php
}


Lorenzo Orlando Caum

  • Support Staff

April 6, 2015 at 3:13 pm

Hi, those appear to be referenced in this file:

thank-you-page-registration-details.template.php

Did you try a registration earlier today and are now checking Google Analytics to see the information?

There is a delay in the reporting of the information in that it won’t appear instantly.


Lorenzo

Viewing 1 reply thread

The support post ‘Variables/terms for Google Ecommerce’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso