Skip to content

edgee-cloud/linkedin-capi-component

LinkedIn CAPI Component for Edgee

Coverage Status GitHub issues Edgee Component Registry

This component implements the data collection protocol between Edgee and LinkedIn CAPI.

Quick Start

  1. Download the latest component version from our releases page
  2. Place the linkedin_capi.wasm file in your server (e.g., /var/edgee/components)
  3. 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"

Event Handling

Event Mapping

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",
});

Configuration Options

Basic Configuration

[[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

Event Controls

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

Consent Management

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

Development

Building from Source

Prerequisites:

  • Rust
  • WASM target: rustup target add wasm32-wasip2
  • wit-deps: cargo install wit-deps

Build command:

make wit-deps
make build

Contributing

Interested in contributing? Read our contribution guidelines

Security

Report security vulnerabilities to [email protected]

About

LinkedIn CAPI Edgee component

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •