← Back
Send Visit Events From Your Akamai Website
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-AgentResponse Content-Type
- 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.
MCP Calls and Agentic Commerce Interactions
This integration only sends pageview events. If you also want to send MCP calls and agentic commerce interactions, send those events through the REST API. For example, you can use the Cloudflare Worker alongside this integration. Otherwise, use the Cloudflare Worker guide as an example of how to send only MCP calls and agentic commerce interactions without duplicating pageview events.