Pay Per Click Report

Russell
336 views

In 2021 a client's Google Ads campaign kept charging for clicks while the phone stopped ringing. He raised the daily budget, and a few clicks later customers started calling again. Analytics showed visitors arriving and leaving within a second, which said something was wrong, not what.

The server log told us more. It held the same GCLID, Google's click ID, on line after line, so we built a pay-per-click report around it: log to CSV to Google Sheets. This is that report rebuilt for 2026, with one correction. A repeated GCLID is one ad click showing up again, and Google does not charge for it twice. In one Fort Worth service business's log, one click ID came back 13 times, while one address brought 6 new ones in 9 minutes.

Pay per click means Google charges you each time someone clicks your ad. With auto-tagging on, each click arrives with a GCLID on the end of the URL, and that ID is the thread between your bill and your server. Your log shows which of the charged clicks reached a page, and how often each came back.

What happens New GCLID? Line in your log?
Someone clicks your ad Yes Yes, unless a CDN answers first
The same visitor reloads the page No, same ID Yes
A visitor returns through a bookmark No, same ID Yes
Someone shares the link and a friend opens it No, same ID Yes
The same link is requested while a CDN holds a cached copy No, same ID No: in our cache test, three requests built the page once

Repeat GCLIDs: what we read in 2021, and what Google says

Link to section: Repeat GCLIDs: what we read in 2021, and what Google says

In 2021 we read the repeats as one visitor clicking the ad over and over. Google's own help describes a milder cause: a visitor shares the ad URL, GCLID included, and everyone who opens it arrives carrying the first visitor's click ID. Google's answer sits on a page now marked legacy, since Universal Analytics was retired:

"There is no workaround for this scenario at the moment."

Google Analytics Help, in Common questions about Google Ads Clicks and Analytics Sessions

So watch the other count: many different GCLIDs from one address in one day. Each is a separate ad click, so each ends up either in Google's invalid clicks column or on your bill. Our GCLID investigation guide and blocking click fraud cover what to do next.

Build the report from your server log

Link to section: Build the report from your server log

Our live log sits in ~/access-logs and gzipped older months in ~/logs; zcat -f reads both, and awk ships on every shared host:

zcat -f ~/logs/example.com-ssl_log-*.gz ~/access-logs/example.com-ssl_log \
  | awk '$7 ~ /[?&]gclid=[A-Za-z0-9_-]/ { match($7, /gclid=[A-Za-z0-9_-]+/);
           print substr($4, 2) "," $1 "," substr($7, RSTART + 6, RLENGTH - 6) "," $9 }' \
  > gclid.csv

The filter reads only $7, the requested URL. A plain grep gclid also matches the Referer, which carries the click ID onto every page the visitor opens next. Then the two counts:

# one click ID seen more than once: reloads, bookmarks, shares
cut -d, -f3 gclid.csv | sort | uniq -c | sort -rn | head

# many click IDs from one address: separate ad clicks
cut -d, -f2,3 gclid.csv | sort -u | cut -d, -f1 | uniq -c | sort -rn | head

Method: on October 13, 2026 we ran this pipeline on two logs. A Fort Worth service business's log, September 30 to October 12, held 57,480 requests and 227 ad-click lines from 128 different clicks; a plain grep gclid counted 416, because 149 lines carried the ID only in the Referer and 40 had an empty value. The 13 visits came from 4 addresses over 10 days, the bookmark pattern; the 6 IDs are six ad clicks to check against the invalid clicks column. Our own log, 171,311 requests since August 31, held only our two test links.

What each column in gclid.csv holds
Column Log field Example
Time $4, with the bracket removed 13/Oct/2026:01:27:36
Address $1, the visitor's IP 203.0.113.7
GCLID Cut out of $7, the requested URL TeSt123Abc
Status $9, the response code 200

Into Google Sheets without publishing your visitors

Link to section: Into Google Sheets without publishing your visitors

The 2021 version pulled the CSV from a public folder with IMPORTDATA, adding a timestamp to the URL to force a fresh copy. Google refreshes IMPORTDATA once an hour, so that trick still has a job. Google's servers fetch the file, though, so the URL has to open without a login, and your visitors' IP addresses become public.

Method When it refreshes Who can read the CSV
IMPORTDATA from a public URL Every hour Anyone with the URL
File > Import, "Append rows to current sheet" When you upload The people you share the sheet with

Take the second row: copy the CSV down with scp, then use File > Import with "Append rows to current sheet", and each week stacks under the one before it.

Read it against the campaign every week

Link to section: Read it against the campaign every week

A pay-per-click strategy comes down to three settings: the daily budget, the keywords you bid on, and the conversions you count. Each week, put Google's click count beside the GCLID lines in your sheet; if Google shows clicks your log lacks, that gap is your first finding. For the full weekly, monthly and quarterly checklist, see our pay-per-click account audit.

Three patterns to check each week
  • Google shows far more clicks than your log. A CDN may be answering repeat requests, or visitors left before the page loaded. Check the CDN's own request logs before you blame the ads.
  • Many GCLIDs from one address. Compare those days with the invalid clicks column, and keep the CSV rows as evidence for a credit request.
  • The budget gone early with no leads. In the 2021 case, raising the budget brought customers back, which fits a budget spent before the buyers searched. Look at spend by hour for the same days.

When to hand the report to someone else

Link to section: When to hand the report to someone else

On a hosted builder with no log access, the pipeline has nothing to read. Ask your host or ad agency to run the two counts weekly and send the CSV with the address column trimmed, not the raw log. For an owner, the short version is this: ask for the weekly number of ad click IDs that reached your site, and compare it with the clicks on your Google Ads bill.

Frequently Asked Questions
What is a pay-per-click report?
A record of the ad clicks that reached your site, built from your server log, kept beside the clicks Google charged for over the same days.
What is a GCLID?
The Google Click Identifier, a parameter Google Ads adds to your ad's URL when auto-tagging is on. Conversion tracking depends on it.
Does a repeated GCLID mean I paid twice?
No. Google gives each ad click its own GCLID. The same ID showing up again is a reload, a bookmark or a shared link.
Why would my log show fewer GCLIDs than Google shows clicks?
A CDN can serve a cached page without asking your server, and a visitor who leaves before the page loads may never reach it. Check the CDN's request logs for the same days.
Can Google Sheets read a server log directly?
Only from a URL anyone can open, through IMPORTDATA, which refreshes hourly. For a file with IP addresses in it, upload it with File > Import.

Google maintains the Help Centers that define every feature named here.

Sources: Google Click Identifier (GCLID): Definition, [UA] Common questions about Google Ads Clicks and Analytics Sessions, About invalid traffic, IMPORTDATA, Set a spreadsheet's location and calculation settings, Import data sets and spreadsheets. Method for the log report: pipeline run by PCDrama on its own server log on October 13, 2026.

Related Articles