Skip to content

Commit d297154

Browse files
examples
1 parent 9ae15e5 commit d297154

File tree

3 files changed

+105
-32
lines changed

3 files changed

+105
-32
lines changed

website/docs/destinations/event_mapping.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ explicitly matched.
5656

5757
<DestinationPush
5858
event={event}
59-
height={'666px'}
60-
labelMiddle={'Config'}
61-
eventConfig={false}
62-
smallText={true}
63-
>
64-
{`{
59+
mapping={`{
6560
order: {
6661
complete: {
6762
name: "purchase",
@@ -101,7 +96,11 @@ explicitly matched.
10196
}
10297
}
10398
}`}
104-
</DestinationPush>
99+
height={'666px'}
100+
labelMiddle={'Config'}
101+
eventConfig={false}
102+
smallText={true}
103+
/>
105104

106105
Change the `event` name to `order visible` and see how the batched mapping is
107106
applied after 1 second.

website/docs/destinations/google-ga4.mdx

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,22 @@ ID</Link>.
9292

9393
<DestinationInit
9494
custom={`{
95-
measurementId: 'G-XXXXXXXXXX', // Required
96-
debug: false,
97-
include: ['globals'],
98-
pageview: false,
99-
data: {
100-
map: {
101-
currency: {
102-
value: 'EUR',
103-
key: 'data.currency',
95+
measurementId: 'G-XXXXXXXXXX', // Required
96+
debug: false,
97+
include: ['globals'],
98+
pageview: false,
99+
data: {
100+
map: {
101+
currency: {
102+
value: 'EUR',
103+
key: 'data.currency',
104+
},
104105
},
105106
},
106-
},
107-
server_container_url: 'https://server.example.com',
108-
snakeCase: true,
109-
transport_url: 'https://www.google-analytics.com/g/collect',
110-
}`}
107+
server_container_url: 'https://server.example.com',
108+
snakeCase: true,
109+
transport_url: 'https://www.google-analytics.com/g/collect',
110+
}`}
111111
/>
112112

113113
### Custom
@@ -176,22 +176,26 @@ individual event mapping.
176176

177177
### add_to_cart
178178

179-
Map your custom walkerOS event to get
180-
an&nbsp;<Link to="https://developers.google.com/analytics/devguides/collection/ga4/reference/events?sjid=10736118709897970414-EU&client_type=gtag#add_to_cart">add_to_cart
181-
gtag.js event</Link>.
179+
Map your walkerOS event to get
180+
an&nbsp;<Link to="https://developers.google.com/analytics/devguides/collection/ga4/reference/events?sjid=10736118709897970414-EU&client_type=gtag#add_to_cart">add_to_cart</Link>
181+
gtag.js event.
182182

183183
<DestinationPush
184+
smallText={true}
185+
height={'512px'}
184186
event={getEvent('product add')}
185187
mapping={mapping.add_to_cart}
186188
/>
187189

188190
### purchase
189191

190-
Map your custom walkerOS event to get
191-
a&nbsp;<Link to="https://developers.google.com/analytics/devguides/collection/ga4/reference/events?sjid=10736118709897970414-EU&client_type=gtag#purchase">purchase
192-
gtag.js event</Link>.
192+
Map your walkerOS event to get
193+
a&nbsp;<Link to="https://developers.google.com/analytics/devguides/collection/ga4/reference/events?sjid=10736118709897970414-EU&client_type=gtag#purchase">purchase</Link>
194+
gtag.js event.
193195

194196
<DestinationPush
197+
smallText={true}
198+
height={'542px'}
195199
event={getEvent('order complete')}
196200
mapping={mapping.purchase}
197201
/>

website/docs/destinations/piwikpro.mdx

Lines changed: 75 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ import PackageLink from '/src/components/docs/package-link';
77
import Link from '@docusaurus/Link';
88
import Tabs from '@theme/Tabs';
99
import TabItem from '@theme/TabItem';
10+
import { getEvent } from '@elbwalker/utils';
11+
import {
12+
DestinationContextProvider,
13+
DestinationInit,
14+
DestinationPush,
15+
} from '@site/src/components/organisms/liveDestination';
16+
import destinationPiwikPro from '@elbwalker/destination-web-piwikpro';
17+
import { mapping } from '@elbwalker/destination-web-piwikpro/examples';
18+
19+
<DestinationContextProvider
20+
destination={destinationPiwikPro}
21+
fnName='_paq.push'
22+
>
1023

1124
<PackageLink
1225
browser="@elbwalker/destination-web-piwikpro"
@@ -80,11 +93,6 @@ ID</Link> and URL.
8093

8194
```js
8295
const config = {
83-
custom: {
84-
appId: 'XXX-XXX-XXX-XXX-XXX', // Id of the site
85-
// linkTracking: false, // Disable download and outlink tracking
86-
url: 'https://your_account_name.piwik.pro/', // Same address as the login
87-
},
8896
mapping: {
8997
order: {
9098
complete: {
@@ -113,6 +121,14 @@ const config = {
113121
};
114122
```
115123
124+
<DestinationInit
125+
custom={`{
126+
appId: 'XXX-XXX-XXX-XXX-XXX', // Id of the site
127+
// linkTracking: false, // Disable download and outlink tracking
128+
url: 'https://your_account_name.piwik.pro/', // Same address as the login
129+
}`}
130+
/>
131+
116132
### Custom
117133
118134
| Property | Type | Description |
@@ -141,3 +157,57 @@ If you need professional support with your walkerOS implementation, check out
141157
our&nbsp;<Link to="/services">services</Link>.
142158
143159
:::
160+
161+
## Mapping
162+
163+
You are able to map your walkerOS events to match the respective requirements of
164+
each vendor. The `mapping` examples are using a
165+
live&nbsp;<Link to="#configuration">configuration</Link>.
166+
167+
:::tip
168+
169+
The code examples are interactive. You can edit the code to generate your
170+
individual event mapping.
171+
172+
:::
173+
174+
### ecommerceProductDetailView
175+
176+
Map your walkerOS event to get
177+
an&nbsp;<Link to="https://developers.piwik.pro/docs/ecommerceproductdetailview#examples">ecommerceProductDetailView</Link>
178+
event.
179+
180+
<DestinationPush
181+
smallText={true}
182+
height={'512px'}
183+
event={getEvent('product view')}
184+
mapping={mapping.ecommerceProductDetailView}
185+
/>
186+
187+
### ecommerceAddToCart
188+
189+
Map your walkerOS event to get
190+
an&nbsp;<Link to="https://developers.piwik.pro/docs/ecommerceaddtocart#examples">ecommerceAddToCart</Link>
191+
event.
192+
193+
<DestinationPush
194+
smallText={true}
195+
height={'512px'}
196+
event={getEvent('product add')}
197+
mapping={mapping.ecommerceAddToCart}
198+
/>
199+
200+
### ecommerceOrder
201+
202+
Map your walkerOS event to get
203+
an&nbsp;<Link to="https://developers.piwik.pro/docs/ecommerceorder#examples">ecommerceOrder</Link>
204+
event.
205+
206+
<DestinationPush
207+
smallText={true}
208+
height={'512px'}
209+
event={getEvent('order complete')}
210+
mapping={mapping.ecommerceOrder}
211+
/>
212+
213+
</DestinationContextProvider>

0 commit comments

Comments
 (0)