News:

Support the VirtueMart project and become a member

Main Menu

E-Commerce-Tracking with Google Tag Manager

Started by grhansolo, September 04, 2015, 14:20:57 PM

Previous topic - Next topic

grhansolo

Hello,

I would like to install the function E-Commerce-Tracking in Google Analytics based on my online-shop. I would like to enact the installation with the Google Tag Manager. To be able to install the E-Commerce-Tracking with the Google Tag Manager, I have to work with the socalled Data Layers.

The following link explains how to work with this:

https://support.google.com/tagmanager/answer/6106097?hl=en

As described in the link above, the Data Layers could look like this:

<script>
dataLayer = [{
    'transactionId': '1234',
    'transactionTotal': 38.26,
    'transactionProducts': [{
        'sku': 'DD44',
        'name': 'T-Shirt',
        'category': 'Apparel',
        'price': 11.99,
        'quantity': 1
    },{
        'sku': 'AA1243544',
        'name': 'Socks',
        'category': 'Apparel',
        'price': 9.99,
        'quantity': 2
    }]
}];
</script>


I want to build together the The Data Layer with PHP. Therefore, I have to request the values with the shop-system somehow.

Transactionvalues:

• ID of the current transaction
• Price oft he current transaction

Article values within the transaction:

• Amount of articles within the current transaction
• SKU of each article within the transaction
• Name of each article within the transaction
• Category of each article within the transaction
• Price of each article within the transaction
• Amount of articles within the transaction

Therefore I have the following questions:

1. Did I explain this principle correctly or is there a mistake I am overseeing?

2. How can I request the above named variables with PHP?

3. Is there a list with the above named variables where I can check what the variables within the shop-system are called? Only if I know what they are called I will be able to request the  values.

It would be great if anyone could help me, I appreciate it!

VirtueJoom

Hi,

I'm also trying to setup the e-commerce transaction feature with GTM, but using a plugin, that you can find at: http://www.easyjoomla.org/free-products/google-tag-manager. This plugin have to be prevously installed in order to work with a seconday plugin of the same developer http://www.easyjoomla.org/others/google-e-commerce-tracker-for-virtuemart. At the time of writing I've installed both plugins in my Joomla system, but I'm only able to set up the Analytics tag succcessfully (which is capturing data for my Google Analytics reports), but the e-commerce plugin (and the e-commerce report on GA) is not available.

I'm not sure if I'm completely aware about the right way to make both plugins work properly, and that why I'm sharing them here, so maybe someone else can try them and see if are useful.

Regards!

devo10

Hi,

I have also the problem with E-Commerce-Tracking from VirtueMart with Google Tag Manager. I would like to know, if anybody solved it. Please, could you help me? Thanks in advance!!

d.