Automatically Appending a UTM String Based on Referrer

14 views Asked by At

I'm trying to append a UTM string onto a URL from an organic search. If the referrer is google / organic could we add ?utm_source=google&utm_medium=organic&utm_campaign=seo through middleware or similar setup?

I've seen something like this in the past, but can't replicate it at this time.

Any input would be greatly appreciated.

I've tried to read the referrer, but nothing's happening. Likely a PEBKAC error.

0

There are 0 answers