Your sales team has a list of leads. Some of them visited your pricing page three times last week. Some of them signed up for a demo six months ago and never came back. Some of them downloaded a white paper yesterday. Without a lead score, every one of those leads looks the same in the CRM. The sales rep starts at the top of the list and works down. By the time they reach the person who visited the pricing page three times, that lead has already chosen a competitor.
Lead scoring solves this. It ranks leads by how likely they are to convert, so the sales team calls the hottest prospects first. According to Landbase, companies using machine-learning lead scoring report around 75 per cent higher conversion rates than those relying on traditional manual scoring. The gap is that traditional lead scoring needs a data scientist to build the model, define the weights, and maintain it over time. Most B2B teams do not have a data scientist. What they do have is Google Analytics full of behaviour data and a CRM full of contacts. Salesforce's own guide to lead scoring recommends starting with behaviour-based signals from your website analytics because they reflect actual buyer intent. A Google Analytics help article explains how to set up conversion events that feed directly into your scoring model.
Here is how to turn GA4 data into Salesforce lead scores using AI that anyone on the team can set up.
The Problem: Too many leads, not enough time to qualify them all
For most B2B teams, the lead list grows faster than the sales team can call. Without a ranking system, every lead gets equal attention. The person who visited once from a random search gets the same follow-up as the person who attended a webinar, downloaded three case studies, and visited the pricing page twice.
The data to distinguish them already exists. GA4 tracks page views, session duration, conversion events, and acquisition channels for every visitor. The CRM has company size, industry, and engagement history. The missing piece is the connection between the two systems and a scoring model that turns behaviour into a priority number.
Step 1: Define your lead scoring criteria from your best customers
Identify what makes a lead valuable
Start with your closed-won deals from the last six months. What behaviour patterns did those leads share before they became customers?
Common scoring signals include: visited the pricing page (high intent), attended a demo or webinar (engaged), downloaded multiple resources (researching), visited the site more than three times in a week (active search), came from organic search (problem-aware), opened email sequences (responsive).
Assign each signal a weight. A pricing page visit might be worth 20 points. A white paper download might be worth 10. Three visits in a week might be worth 15. You can refine these weights later when you see which signals actually correlate with closed deals. The important thing is to start with something that reflects your business logic.
For a structured approach to building this criteria, the lead qualification agent guide covers how to define scoring signals for an automated pipeline. The cold email personalisation workflow with Hunter.io and n8n shows how enrichment data feeds into lead prioritisation on the outbound side.
Step 2: Export GA4 behaviour data for your leads
Get the behaviour data out of Google Analytics
GA4 offers two ways to export: the Explorations report for manual exports, and the Data API for automated pipelines.
For a manual first pass, use GA4's Explorations to create a free-form report. Add dimensions (page path, session source or medium, date) and metrics (sessions, engaged sessions, event count, session duration). Filter by users who match your known leads. Export the data as a CSV.
For an automated pipeline, use the GA4 Data API v1. Set up a recurring export that pulls the last seven days of user engagement data and sends it to a staging database or spreadsheet. The export should include at minimum: user ID or client ID, session count, page views, session duration, conversion events, and source or medium.
Step 3: Feed the GA4 data to ChatGPT for scoring
Use an AI prompt that applies your scoring criteria
Take the CSV export and feed it into ChatGPT with a prompt that describes your scoring system.
Here is the prompt we use:
I have lead behaviour data from Google Analytics. Score each lead from 0 to 100 based on these criteria: - Pricing page visit: +20 points - Demo/webinar attendance: +25 points - Multiple resource downloads: +10 per download - More than 3 site visits in a week: +15 points - Organic search source: +10 points - Email engagement: +10 points Data (CSV format): [Paste the export data here] Return the scores as a table with columns: Lead ID, Name, Score, Top Signals, Priority (High/Medium/Low).
ChatGPT returns a scored list within seconds. Review the scores for a handful of leads you already know well. If a lead you know is cold scores high, adjust the weights. If a lead you know is hot scores low, you may be missing a key signal. Iterate on the prompt until the scores match your intuition about your pipeline.
Step 4: Write the scores back to Salesforce
Update the lead score field in your CRM automatically
Once you have the scores, write them back to Salesforce using the Salesforce API or an n8n workflow.
In Salesforce, create a custom field on the Lead object called "AI Lead Score" (number, 0-100). Then use an n8n workflow or Zapier connection that:
- Takes the scored output from ChatGPT (as a CSV or JSON)
- Matches each lead by email or Salesforce Lead ID
- Updates the AI Lead Score field on each matching Salesforce record
- Logs the scoring timestamp so the team knows when it was last updated
Run this workflow weekly. Each week, the GA4 export captures new behaviour, ChatGPT re-scores, and Salesforce updates. The sales team starts each week with a fresh priority list.
Step 5: Route scored leads to your sales team
Configure Salesforce to assign by score threshold
Use Salesforce's assignment rules or process builder to route leads based on their AI Lead Score.
A simple three-tier routing system:
- Score 70+ (High): Assign to an inside sales rep within 24 hours. These leads are actively evaluating.
- Score 30-69 (Medium): Add to an email nurture sequence. These leads are interested but not urgent.
- Score 0-29 (Low): Keep in the database. Run re-engagement campaigns monthly.
This triage alone saves the sales team hours per week. They stop calling cold leads and start having conversations with people who have already shown buying intent.
What Changes When It Is Done
Before this setup, the sales team worked through the lead list in chronological order. The hottest lead might be buried at the bottom of the list. After this setup, every lead has a visible score in Salesforce. The sales team sorts by score descending and calls the people most likely to convert. The scoring runs weekly on autopilot. No data scientist required.
Frequently Asked Questions
Do I need a data scientist to set up lead scoring?
Not with this approach. ChatGPT handles the scoring logic based on your criteria. A data scientist would build a custom model. AI handles the initial framework in a fraction of the time.
What data do I need from Google Analytics?
Page views per lead, session duration, pages per session, conversion events, and source or medium. GA4 can export this data through the Explorations report or the Data API.
How often should scores be updated?
Weekly is a good starting point for most B2B teams. As leads engage with your content, their scores change. Daily updates are possible but usually unnecessary unless you have high-volume inbound traffic.
What is a good lead scoring threshold?
Start by scoring leads from 0 to 100. Leads above 70 go to the sales team immediately. Leads between 30 and 70 go into a nurture sequence. Below 30 stays in the database for future scoring.
Does this work with HubSpot instead of Salesforce?
Yes. The same approach works with any CRM that has API access. HubSpot, Pipedrive, and ActiveCampaign all support writing lead score data programmatically.