Enhancing Google Analytics

Data analytics in 2019 are a massive part of not only technology but other industries like sports, business & services. Any transaction, behaviour or metric can be tracked, graphed & then conclusions can be drawn from the analysis, all in an effort to find ways to learn & improve. 

Restaurants & cafes are no different & for those clients that use Google Analytics, Mobi2Go provides tracking of events using the Google Analytics Enhanced Ecommerce plugin with analytics.js.

 

Remember

In order to enable this feature for your business, please refer to this article as you can do this yourself! If you do get stuck, feel free to contact our Support team with the Tracking ID of the Google Analytics property (a string similar to 'UA-XXXXX-Y'.)

How to enable Enhanced Ecommerce

  1. Log in to your Google Analytics account
  2. Go to Admin (bottom-left corner)
  3. Select the correct View (3rd column) & click on Ecommerce Settings
  4. Toggle Enable Ecommerce to On 
  5. This will make Enable Enhanced Ecommerce Reporting appear
  6. Toggle Enable Enhanced Ecommerce Reporting to On
  7. Click Save to submit your changes to your Google Analytics console

 

What data is captured?

As per the Google documentation, an event sent to Google Analytics has a signature as follows:

ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);

 

  • The events we send are detailed below:
// when last order button is clicked
ga('send', 'event', 'order', 'load last order', lastOrderState.id);

// when the user chooses a location
ga('send', 'event', 'location', 'set location', location.name);

// when the user is logged in
ga('set', {userId: customer.id});

// when the user views a menu category
ga('send', 'event', 'menu', 'view category', category.name);

    // set the ecommerce action
    ga('ec:setAction', 'detail')

    // add each product in the menu category as an impression
    ga('ec:addImpression', {
        id: menu_product.id,
        name: menu_product.name,
        list: list_name,
        category: menu_product.category ? menu_product.category.name : null,
        position: position
    });


// when a user views a menu
ga('send', 'event', 'menu', 'view menu', menu.name);

    // set the ecommerce action
    ga('ec:setAction', 'detail')

    // add each product in the menu category as an impression
    ga('ec:addImpression', {
        id: menu_product.id,
        name: menu_product.name,
        list: list_name,
        category: menu_product.category ? menu_product.category.name : null,
        position: position
    });


// when a user edits a product
ga('send', 'event', 'menu', 'edit product', product.menu_product.name);

    // set the ecommerce action
    ga('ec:setAction', 'detail')

    // detail the product
    ga('ec:addProduct', {
        id: product.menu_product.id,
        name: product.menu_product.name,
        price: product.price.toFloat(),
        quantity: product.quantity,
        variant: product.size ? product.size.menu_modifier.name : null,
        category: product.menu_product.category
            ? product.menu_product.category.name
            : null,
        position: product.menu_product.category_list_position
            ? product.menu_product.category_list_position
            : null
    });


// when a user adds a product to their cart
ga('send', 'event', 'order', 'add product', product.menu_product.name);

    // set the ecommerce action
    ga('ec:setAction', 'add')

    // detail the product
    ga('ec:addProduct', {
        id: product.menu_product.id,
        name: product.menu_product.name,
        price: product.price.toFloat(),
        quantity: product.quantity,
        variant: product.size ? product.size.menu_modifier.name : null,
        category: product.menu_product.category
            ? product.menu_product.category.name
            : null,
        position: product.menu_product.category_list_position
            ? product.menu_product.category_list_position
            : null
    });


// when a user removes a product from their cart
ga('send', 'event', 'order', 'remove product', product.menu_product.name);

    // set the ecommerce action
    ga('ec:setAction', 'remove')

    // detail the product
    ga('ec:addProduct', {
        id: product.menu_product.id,
        name: product.menu_product.name,
        price: product.price.toFloat(),
        quantity: product.quantity,
        variant: product.size ? product.size.menu_modifier.name : null,
        category: product.menu_product.category
            ? product.menu_product.category.name
            : null,
        position: product.menu_product.category_list_position
            ? product.menu_product.category_list_position
            : null
    });


// when an order has been completed
ga('send', 'event', 'order', 'payment');

// when the user starts checkout
ga('send', 'event', 'order', 'checkout');
ga('send', 'event', 'order', 'confirmed');

// when a user starts payment
ga('send', 'event', 'order', 'start payment', order.getId());

// when the credit card details are saved
ga('send', 'event', 'order', 'save credit card');

 

More information about event tracking can be found via the Google Analytics documentation.

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.