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() ?>
});
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.
Support forum for Event Espresso 3 and Event Espresso 4.