Skip to content

otyeung/contact-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contact Form App

Tech Stack Used

The app is built based on sveltekit and Google Form API. Deployment in Vercel for GTM demo.

What does it do

This app is a simple contact form app that collects user contact info and submits the lead to Google Sheet via Google Form API and fire an event to GTM via GA4 client.

It's part of end-to-end demo about the functionality of LinkedIn CAPI (server side tagging implmentation) with Google Tag Manager.

In order to capture & use LinkedIn First Party Cookie (li_fat_id), please make sure :

  1. You have installed Insight Tags directly in your apps, or through GTM (preferred method)
  2. Enable first-party cookies on LinkedIn Insight Tag

Screenshots

1 2 3 4

Customize to use your own GTM Tags and Web Container Tag

Please modify the TAG values in "src/app.html".

Customize to submit the lead to your own Google Form

Please modify the googleFormUrl variable in "/src/routes/index.svelte"

Test the app locally

Open terminal in your apps directory, run

npm i
npm run dev

Visit the app at http://localhost:3000?li_fat_id="dummy_li_fat_id"

Deploy the app to Vercel

  1. Sign up a Vercel account
  2. Install Vercel CLI
  3. Open Terminal in your code directory
vercel (For first time it shall ask you to login and create a project in your vercel dashboard, you'll see a directory ".vercel" created)
vercel deploy (create a new deployment)
vercel --prod (deploy to production)
  1. Whenever you made any code changes, execute "vercel --prod" again
  2. Go to your vercel dashboard, you should copy the Production Domain, this is required in GTM setup.

5

About

LinkedIn CAPI Demo apps for Google Tag Manager

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors