Skip to content

Commit

Permalink
Remove Universal Analytics example
Browse files Browse the repository at this point in the history
  • Loading branch information
tjardoo committed Feb 11, 2023
1 parent 2bcf51b commit 45ba80e
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ An easier way to add Google Tag Manager to your Laravel application. Including r
- [Ecommerce (GA4)](#ecommerce-ga4)
- [Ecommerce Item](#ecommerce-item)
- [Ecommerce Events](#ecommerce-events)
- [Ecommerce (UA)](#ecommerce-ua)
- [Tests](#tests)
- [License](#license)

Expand Down Expand Up @@ -197,41 +196,6 @@ TagManager::purchase('00001', 'Google', 'EUR', 12.10, 2.10, 0, [

More information: [https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm](https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm)

### Ecommerce (UA)

You can use the following snippet to trigger an Ecommerce purchase event with Universal Analytics (UA).

```php
use Label84\TagManager\Facades\TagManager;

TagManager::push(['ecommerce' => [
'purchase' => [
'actionField' => [
'id' => 'T12345',
'affiliation' => 'Online Store',
'revenue' => '35.43',
'tax' => '4.90',
'shipping' => '5.99',
'coupon' => 'SUMMER_SALE',
],
'products' => [[
'name' => 'Triblend Android T-Shirt',
'id' => '12345',
'price' => '15.25',
'brand' => 'Google',
'category' => 'Apparel',
'variant' => 'Gray',
'quantity' => 1,
'coupon' => '',
], [
// more items..
]],
],
]]);
```

More information: [https://developers.google.com/analytics/devguides/collection/ua/gtm/enhanced-ecommerce#purchases](https://developers.google.com/analytics/devguides/collection/ua/gtm/enhanced-ecommerce#purchases)

## Tests

```sh
Expand Down

0 comments on commit 45ba80e

Please sign in to comment.