Viewing 1 replies (of 1 total)
  • I’m not too sure what Google Analytics does with the data, but the way the plugin obtains data from EDD means that:

    The individual product item(s) are recorded at full price.

    The overall purchase is recorded at the final price including discount.

    Here is an example of the data sent to Google for one product purchased with a 30% discount:

    ga(‘require’, ‘ecommerce’, ‘ecommerce.js’);

    ga(‘ecommerce:addTransaction’, {
    ‘id’: ‘11179’, // Transaction ID. Required.
    ‘affiliation’: ‘My Store’, // Affiliation or store name.
    ‘revenue’: ‘34.3’, // Grand Total.
    ‘shipping’: ‘0’, // Shipping.
    ‘tax’: ‘0’ // Tax.
    });

    ga(‘ecommerce:addItem’, {
    ‘id’: ‘11179’, // Transaction ID. Required.
    ‘name’: ‘Test Product’, // Product name. Required.
    ‘sku’: ‘149’, // SKU/code.
    ‘price’: ’49’, // Unit price.
    ‘quantity’: ‘1’ // Quantity.
    });

    ga(‘ecommerce:send’);

    I’m afraid I don’t know enough about GA to say how it represents that discrepancy in its reports, sorry! If anyone else can comment, that would be great.

    If GA has a mechanism to log a discount that could be incorporated into the plugin potentially.

    Thanks,

    Dan

Viewing 1 replies (of 1 total)
  • The topic ‘Discount Codes Issue’ is closed to new replies.