Detailed Edgee Data Layer guide
<script>
tag with type="application/json"
and a specific ID.
For React applications, you can use the EdgeeDataLayer
component from the react-edgee
package.
data_collection
:
Field | Type | Description | |
---|---|---|---|
events | optional | Array | Contains a list of events (see below for the event structure). |
context | optional | Object | Contains general information that can be used for all events. |
components | optional | Object | Specifies which components should receive the data. This enables targeted data transmission based on your configuration. |
events
listField | Type | Description | |
---|---|---|---|
type | required | String | The type of event: page , track , or user . |
data | optional | Object | The data structure depends on the event type (see detailed pages). This is required for track events. |
components | optional | Object | Specifies which components should receive the data. |
context
objectField | Type | Description | |
---|---|---|---|
page | optional | Object | General info about this page that can be used across events. |
user | optional | Object | General info about the user that can be used across events. |
page
or user
, it’s going to be used automatically
for all compatible events, so you don’t need to provide the same information multiple times.
For example, data_collection.context.user
is used to define the data
fields for user
events.components
objectField | Type | Description | |
---|---|---|---|
all | optional | Boolean | Even if you don’t define this field, it will be set to true by default. But if you set it to false , no component will receive the data. |
<component_name> | optional | Boolean | If true , the specified component will receive the data. If false , the component will not receive the data. |
components
object to specify which analytics components should and should not receive the data. If you do not specify any component,
all configured components will receive the data by default.
You can find a few examples in the next section.
components
object can be set globally for all data collection or for individual events.
This gives you full control and the ability to be very granular about what data is sent to which components.
Please also note that the components
object defined for an individual event will
override the global configuration for that event.identify
section, ensure you have obtained explicit consent from the user in compliance with GDPR, CCPA, and other privacy regulations.