← Back
Connect Your Akamai Website to Agent & LLM Analytics
Overview
This integration uses Akamai DataStream 2 to send analytics events to Known Agents from your Akamai CDN. Please contact us if you need help getting set up.
Step 1: Create a DataStream
- Sign in to Akamai Control Center
- Navigate to DataStream in the sidebar
- Click Create a stream
- Select your property and click Next
Step 2: Configure Your Data Set
Select the following fields for your data set:
- Log information
Request time
- Message exchange data
Request hostClient IPRequest methodHTTP status codeRequest pathQuery stringUser-Agent
- Request header data
Referer
- Network performance data
Turn around time
Step 3: Configure the Destination
- From the Destination dropdown, select Custom HTTPS
- For the Display Name, choose something like
Known Agents Analytics - For Authentication, select BASIC
- Enter this Endpoint URL:
https://api.knownagents.com/logs/akamai
- Navigate to the Known Agents Projects page and open your project
- Copy your access token from the Settings page
- For Username, enter something like your company name (this field is not important)
- For Password, paste your access token
- Check Send compressed data
- Select JSON as the log format
- Choose 30 seconds as the push frequency
- Click Save stream
Step 4: Activate the Stream
- After creating the stream, click Proceed to Property Manager and select your property
- Click Edit a new version
- Navigate to Property Configuration Settings
- From the + Behavior dropdown, select Standard property behavior
- Search for DataStream and click Insert Behavior
- In the DataStream section, select DataStream 2 from the Stream Version dropdown
- Toggle Enable to On
- Select your stream in the Stream Name dropdown
- Set the sample rate to 100
Step 5: Create Variables for HTTP Headers
- In Property Manager, within the same rule, add a Set Variable behavior for each signature header
- For the Signature header:
- Click + Behavior and add Set Variable
- Create a new variable named
PMUSER_SIGNATURE - Set Create Value From to Extract
- Set Get Data From to Request header
- Enter the header name:
Signature
- For the Signature-Agent header:
- Add another Set Variable behavior
- Create a new variable named
PMUSER_SIGNATURE_AGENT - Set Create Value From to Extract
- Set Get Data From to Request header
- Enter the header name:
Signature-Agent
- For the Signature-Input header:
- Add another Set Variable behavior
- Create a new variable named
PMUSER_SIGNATURE_INPUT - Set Create Value From to Extract
- Set Get Data From to Request header
- Enter the header name:
Signature-Input
Step 6: Configure Log Request Details
- In Property Manager, add or edit the Log Request Details behavior in your property configuration
- Enable:
- Log Host Header
- Log Referer Header
- Log User-Agent Header
- Enable Include Custom Log Field
- In the Custom Log Field input, add the following:
{"signature":"{{user.PMUSER_SIGNATURE}}","signature_agent":"{{user.PMUSER_SIGNATURE_AGENT}}","signature_input":"{{user.PMUSER_SIGNATURE_INPUT}}"}
- Save the configuration and activate the new version
Step 7: Test Your Integration
- Navigate to the Projects page
- Select your project
- Click Settings
- Click Send a Test Visit
- Click Realtime
If your website is correctly connected, you should see visits from a test agent in the realtime timeline within a few seconds.