First Click Attribution Script in GTM from Meta / FB
Task:
Create a script that will "catch" the first touch of a person (for now, we are only doing this for fbclid and utm), meaning that in the presence of fbclid, and in the presence of utm_source / utm_medium - we will make a record that, contrary to all the rules of Khoroshop, should be carried over to the order
Or send this record to the server and then match it by ga_id / client_id / user_pseudo_id (or an equivalent that we have live in the data)
The essence of the script:
1 - Capture the first click (in Khoroshop, the session is 30 minutes)
2 - prevent this click from dying / being overwritten / being erased
3 - Insert into the order (or save it in parallel somewhere so that it can be matched later in the database (BQ for example)
Important conditions:
it is necessary to record when both fbclid and utm_source / utm_medium are present, because organic Instagram also has fbclid and utm_source, and we are not interested in organic, we need to increase the evidence base of orders that paid FB advertising has brought
Do not overwrite existing data to avoid duplicates, store data for about 30 days (I don't know what would be optimal)
we have something working, but it needs to be completed, refined, and made perfect
Client's review of cooperation with Kyryl Shcherbyna
First Click Attribution Script in GTM from Meta / FBThe work is done, I have no questions, I recommend the specialist. It was easy and quick to work.
Freelancer's review of cooperation with Іllya Stepanov
First Click Attribution Script in GTM from Meta / FBA pleasant client, deeply understands their issue, skillfully uses their tools. Clearly knows how the finished project should look. I recommend for collaboration.
-
Hello. I can develop a script to capture the first click on fbclid and utm, so that it does not get overwritten during the session. I will record it only if both parameters are present, as you mentioned. I will store the data for at least 30 days to avoid duplicates. What other details are important for this? Do you have examples of already working solutions that can be used as a basis?
-
249 Good day, Ilya! The project looks interesting. I have relevant experience in similar tasks. To assess the timelines/budget, I need a bit more detail. Can we discuss this tomorrow with a short call?
-
976 4 0 Good day, my name is Dmytro, I am from the KingKongLab team. I have reviewed the task — it is necessary to implement correct first-click attribution through GTM with the fixation of fbclid + utm_source / utm_medium and the transfer of this data to the order or saving it for further matching.
We can refine your current version and make the logic stable and without duplications. We will implement:
— fixation of the first click only if both fbclid and utm_source / utm_medium are present
— saving data in localStorage / cookie with TTL (for example, 30 days) without overwriting
— protection against overwriting an already fixed first touch
— transmission of data to the order or sending to the server for further matching via ga_id / client_id / user_pseudo_id
— an option with integration into BQ or another database for analytics
…
I understand the nuance with Instagram organic and fbclid — we will filter the logic so that only paid advertising is taken into account, without "noise."
We work with GTM, Meta, GA4, BigQuery, custom attribution scripts. We can first conduct an audit of the current implementation, show where the weak point is, and propose a clean solution without workarounds.
I am ready to discuss the details and immediately start the refinement.
Current freelance projects in the category Databases & SQL
Refinement of 1C UT 11 for Zebra TSD (RDP): different sound signals when scanning
22 USD
Configuration: 1C UT 11 Address warehouse Zebra TC26 TSD Work via RDP Product scanning is performed in receiving, placement, picking documents, and other warehouse operations. Current problem: Warehouse workers operate through the Zebra TSD. When scanning, they do not always… C#, Databases & SQL ∙ 1 day back ∙ 5 proposals |
Heal the 1C configuration
111 USD
Configuration of CRM & ERP SmartCeiling (2.8.26.0) Protection via Registration Code. Registered until the end of the year. Databases & SQL ∙ 1 day 15 hours back ∙ 8 proposals |
Need a 1C specialist for refinements and development.I am looking for a 1C specialist for freelance collaboration. I am currently working with a contractor who provides support and maintenance for the 1C system. However, due to the contractor's workload, there is a need for prompt execution of additional tasks, improvements, and… Databases & SQL ∙ 6 days 14 hours back ∙ 12 proposals |
Restoring Instagram after a banOn March 3, 2026, my Instagram was blocked due to a violation of rules. I believe there has been some mistake, as the page was personal with photos and videos of my personal trips. I did not post any comments anywhere. I have sent several appeals. I cannot download my files… Databases & SQL, Web Programming ∙ 7 days 1 hour back ∙ 6 proposals |
Eliminate the issue of incomplete data import from Excel files of Nova Poshta specifications into 1C:
45 USD
Goal: There is a processing in 1C for uploading the specifications of Nova Poshta. For unclear reasons, it has stopped loading some tabular data. We need to find the reason and eliminate the problem of incomplete data import from Excel files of Nova Poshta specifications into… System & Network Administration, Databases & SQL ∙ 10 days 8 hours back ∙ 16 proposals |