> For the complete documentation index, see [llms.txt](https://matteo-gabriele.gitbook.io/vue-gtag/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://matteo-gabriele.gitbook.io/vue-gtag/master/methods/purchase.md).

# purchase

```javascript
export default {
  name: 'MyComponent',

  methods: {
    track () {
      this.$gtag.purchase({
        "transaction_id": "24.031608523954162",
        "affiliation": "Google online store",
        "value": 23.07
      })
    }
  }
}
```

{% hint style="info" %}
Remember, this is just an example. check the all API parameters in the official gtag documentation [here](https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce)
{% endhint %}
