Skip to main content

Marketing Tracking Overview

Lawmatics can automatically assign a marketing source and campaign to every new lead that comes in through an online ad — without anyone at your firm having to do it manually. This article explains how that system works and how to set it up.


How it works

When someone clicks on one of your ads, the ad platform (Google, Meta, etc.) adds tracking codes called UTMs to the URL of your website. These codes identify which ad the person clicked on.

Your Lawmatics tracking pixel — a small snippet of code installed on your website — reads those UTM codes and stores them in the background while the person browses your site. When they fill out and submit your embedded Lawmatics form, those stored codes are sent along with the form submission. Lawmatics then checks whether any of your marketing sources or campaigns have a matching UTM code, and if they do, it automatically assigns that source and campaign to the new matter.

The result: every lead that comes in through a tracked ad is automatically attributed to the right source and campaign, with no manual entry required.


Setting it up

There are three things that need to be in place for automatic tracking to work.

1. Create your sources and campaigns

Sources are the top level — things like Google, Facebook, or Company Referrals. Campaigns nest underneath each source and represent specific ads or efforts within that source.

You'll create these on the Marketing Settings page in Settings. Even if a source only has one campaign, you still need to create at least one campaign, because spend and UTM codes are entered at the campaign level.

2. Add UTM codes to your sources and campaigns

UTM codes are how Lawmatics matches an incoming lead to the right source and campaign. You'll find them in the URL of your landing page — they look like this:

?utm_source=google&utm_campaign=personal-injury-branded

The value after utm_source= goes in the URL Params Match Value field on your source. The value after utm_campaign= goes in the same field on the corresponding campaign.

A few things to keep in mind:

  • UTM values are case-sensitive and must match exactly — including hyphens and lowercase letters

  • Lawmatics only captures utm_source and utm_campaign — not medium, term, or other parameters

  • If you see a long string of numbers in the campaign field, that's a campaign ID, not a UTM campaign name — these are two different things in Google Ads

3. Install the tracking pixel on your website

The tracking pixel is a small snippet of code that reads the UTM codes from the URL when someone lands on your site. You generate it in Lawmatics under Settings > Tracking Settings, then paste it into your website — ideally on the same page where your contact form is embedded.

The pixel works silently in the background and adds nothing visible to your site.


Using the Google Ads integration

If you run Google Ads, you can connect the Google Ads integration instead of setting up sources and campaigns manually. The integration will automatically create a source and campaigns in your Marketing Settings and pull in your ad spend on an ongoing basis.

After connecting, verify that the UTM codes were brought over correctly. If they weren't, you'll need to add them manually to the synced sources and campaigns.


Estimated Value and Actual Value

For ROI reporting to be useful, your matters need to have values populated. Lawmatics uses two fields:

Estimated Value is the anticipated revenue from a lead — enter this during intake, before they've hired your firm.

Actual Value is the revenue you actually received — enter this after the matter converts or closes.

These fields, combined with the marketing spend you log on your campaigns, are what power the cost-per-lead and cost-per-client metrics in your Analytics page.


FAQ

Why isn't a source being assigned to new leads coming in through my ads?

Work through this checklist:

  • Is the tracking pixel installed on the same page as your embedded form?

  • Are you using a native Lawmatics form that's embedded on your site — not linked, and not a third-party form like Gravity Forms?

  • Does the source or campaign in Lawmatics have a UTM code entered in the URL Params Match Value field?

  • Does that UTM code exactly match what's in your ad URL — including capitalization, hyphens, and spacing?

  • Was this lead created through Zapier or the API? If so, the pixel won't apply — UTMs need to be passed manually through those methods.

The source is being assigned but the campaign isn't. Why?

The most common cause is that the UTM campaign value in Lawmatics doesn't exactly match what's coming in from the ad. Check that the campaign's URL Params Match Value matches the utm_campaign in your ad URL character for character. Also confirm you're using the UTM campaign name, not the campaign ID — a campaign ID is a long string of numbers and is a different value.

Can Lawmatics capture UTM medium, term, or other parameters?

No. Lawmatics only captures utm_source and utm_campaign. Other UTM parameters may still appear in your URL but cannot be tracked through the pixel or form submission.

I connected the Google Ads integration and now my UTM tracking stopped working. What happened?

The integration likely created a new source and campaigns, but your UTMs are still pointed at your old manually-created source. The new source needs to have the correct UTM codes added, and the old source needs to have its UTM codes removed. Do not delete the old source until you've checked whether any historical spend is logged against it — deleting a source with spend will remove that data. Instead, clean up the UTM values on the old source and move historical attribution to the new one if needed.

My pixel is installed but UTMs still aren't being captured. How do I test it?

Go to the page where your form is embedded and add UTM parameters manually to the URL, like this:

Press enter to reload the page with those parameters in the URL, then fill out and submit the form. Check the new matter in Lawmatics to see if the source and campaign were assigned. If they weren't, and you used a UTM that matches an existing source and campaign in your account, there may be an issue with the pixel installation.

What's the difference between the Referrals source and other sources?

Referrals is a built-in source that comes with every Lawmatics account. When a matter is assigned to Referrals, the campaign field on that matter is used to record the referrer's name — so if you need to pull referral data in a custom report, filter or group by the Campaign field.

Did this answer your question?