mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 01:54:34 +03:00
67be43b6e6
* Add tagged events support for revenue goals This commit adds two special classes for tracking revenue with tagged events. The following example sends an event with revenue data when the tracker script has revenue and tagged-events script extensions: ```html <button class="plausible-event-revenue-amount=10.29 plausible-event-revenue-currency=EUR"></button> ``` * Rename special revenue tracking class name
23 lines
663 B
HTML
23 lines
663 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>Plausible Playwright tests</title>
|
|
|
|
<script defer src="/tracker/js/plausible.local.manual.revenue.tagged-events.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<button id="manual-purchase" onclick="window.plausible('Purchase', {revenue: {amount: 15.99, currency: 'USD'}})">
|
|
Click me
|
|
</button>
|
|
|
|
<button id="tagged-purchase" class="plausible-event-name=Purchase plausible-revenue-currency=EUR plausible-revenue-amount=13.32">
|
|
Click me
|
|
</button>
|
|
</body>
|
|
</html>
|