This component implements the data collection protocol between Edgee and LinkedIn CAPI.
- Download the latest component version from our releases page
- Place the
linkedin_capi.wasm
file in your server (e.g.,/var/edgee/components
) - Add the following configuration to your
edgee.toml
:
[[components.data_collection]]
id = "linkedin_capi"
file = "/var/edgee/components/linkedin_capi.wasm"
settings.linkedin_access_token = "YOUR_ACCESS_TOKEN"
The component maps Edgee events to LinkedIn CAPI events as follows:
Edgee event | LinkedIn CAPI Event | Description |
---|---|---|
Page | NONE | LinkedIn CAPI doesn't have Page event |
Track | URN of the conversion rule created through API. | Uses the provided conversion rule name directly |
User | NONE | LinkedIn CAPI doesn't have User event |
Here is an example of a track call:
edgee.track({
name: "urn:lla:llaPartnerConversion:123",
});
[[components.data_collection]]
id = "linkedin_capi"
file = "/var/edgee/components/linkedin_capi.wasm"
settings.linkedin_access_token = "YOUR_ACCESS_TOKEN"
# Optional configurations
settings.edgee_default_consent = "pending" # Set default consent status
Control which events are forwarded to LinkedIn CAPI:
settings.edgee_page_event_enabled = false # Disable page view tracking as it doesn't exist on this component
settings.edgee_track_event_enabled = true # Enable/disable custom event tracking
settings.edgee_user_event_enabled = false # Disable page view tracking as it doesn't exist on this component
Before sending events to LinkedIn CAPI, you can set the user consent using the Edgee SDK:
edgee.consent("granted");
Or using the Data Layer:
<script id="__EDGEE_DATA_LAYER__" type="application/json">
{
"data_collection": {
"consent": "granted"
}
}
</script>
If the consent is not set, the component will use the default consent status.
Important: LinkedIn CAPI requires the consent status to be set to granted
. If not, the events will be ignored.
Consent | Events |
---|---|
pending | ignored |
denied | ignored |
granted | forwarded |
Prerequisites:
- Rust
- WASM target:
rustup target add wasm32-wasip2
- wit-deps:
cargo install wit-deps
Build command:
make wit-deps
make build
Interested in contributing? Read our contribution guidelines
Report security vulnerabilities to [email protected]