Apr 26, 2021
0
Level 1
google ecommerce tracking setup in laravel8
hello i have made an ecommerce website in laravel and want to set up google ecommerce tracking to my website. but i am very confuse how to do it. first is there any library i need to attach? like i have read docs and they say if you have gtag.js set up. but i could not find link to this js library. does it mean i need to have an account in google tag manager? but i dont want that. and the code that google developer docs provide. i just need to change that to implement ecommerce tracking? can anybody clarify and guide me?
gtag('event', 'purchase', {
"transaction_id": "24.031608523954162",
"affiliation": "Google online store",
"value": 23.07,
"currency": "USD",
"tax": 1.24,
"shipping": 0,
"items": [
{
"id": "P12345",
"name": "Android Warhol T-Shirt",
"list_name": "Search Results",
"brand": "Google",
"category": "Apparel/T-Shirts",
"variant": "Black",
"list_position": 1,
"quantity": 2,
"price": "2.0"
},
{
"id": "P67890",
"name": "Flame challenge TShirt",
"list_name": "Search Results",
"brand": "MyBrand",
"category": "Apparel/T-Shirts",
"variant": "Red",
"list_position": 2,
"quantity": 1,
"price": "3.0"
}
]
});
Please or to participate in this conversation.