What Agent Analytics reads
Agent Analytics reads two types of lines from the log:- The requests of AI bots. Genezio identifies the bot from the user agent, for example
GPTBot,ClaudeBot, orPerplexityBot. It counts each visit by day, bot, page, and status code. - The page views of people. A page view is a line from a browser, with the method
GET, a status of2xxor304, and a path that is not a static file. Genezio counts the page views by day, page, country, and AI platform.
chatgpt.com, perplexity.ai, or claude.ai. When the referer gives no AI assistant, Genezio reads the utm_source parameter of the URL. For example, ChatGPT adds utm_source=chatgpt.com to its links.
Genezio ignores the other lines: search engines, scripts, monitors, and the static files of a page, such as images, scripts, and fonts.
The country of a bot visit is the country of the server of the bot, not of a person. Thus, Agent Analytics shows the countries of the people only.
What Genezio keeps
Genezio keeps only counts and the requests of the AI bots:- Genezio does not keep an IP address. It reads the IP address of a bot only to verify the bot.
- Genezio does not keep the referer. It reads the referer only to find the AI platform that sent a person.
- Genezio removes the query from each URL, because a query can hold a token or a personal value.
- Genezio does not keep the requests of people. It keeps only the count of page views for each day, page, and country.
File requirements
When your log is larger than 50 MB, divide it into more files. Make sure that each day is in one file only. Refer to Upload more than one file.
The CSV format
The first line of the file is the header. The names of the columns are not case-sensitive, and the order of the columns is free. Genezio ignores a column that is not in this table.
Without
client_ip, Genezio cannot verify a bot. Without country_code, the page shows no country of people. Without referer, Genezio finds an AI referral only from utm_source.
Example
Time formats
Thetimestamp column accepts these formats:
A time without a time zone is UTC. Genezio groups the visits by the UTC day.
The Combined Log Format
Genezio also reads the Combined Log Format of nginx and Apache. Each line holds the user agent at the end:- nginx writes this format with the predefined
combinedformat ofaccess_log. - Apache writes this format with
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined.
country_code.
Export the log from your CDN
Export the log from the CDN, not from the origin server. Behind a CDN, the origin server sees the IP address of the CDN, not of the client. Each CDN uses its own names for the fields. Select the fields in this table, and then rename them to the columns of Genezio.
The names of the fields can change. Examine the documentation of your CDN before you start the export.
CloudFront writes its standard logs as text with tabs, and it encodes the user agent. Convert the file to CSV before you upload it. The standard logs of CloudFront have no country.
Convert a JSON export to CSV
Many CDNs write the log as JSON, with one object on each line. This script converts such a file to the CSV of Genezio. ChangeCOLUMNS to the field names of your CDN. The example uses the fields of Cloudflare.
EdgeStartTimestamp as RFC 3339, as Unix seconds, or as Unix nanoseconds. Select RFC 3339 or Unix seconds. Genezio cannot read nanoseconds.
Upload the file
1
Open Agent Analytics
In the dashboard, open your brand, and then open Agent Analytics.
2
Open the settings
Select the Settings tab.
3
Upload the log
Drag the file to the upload area, or select Upload log. Genezio checks the first line of the file at once.
4
Wait for the result
Genezio reads the file in the background. A summary shows the visits of the AI bots and the page views of people.