Adding eCommerce events to the website
Goals
Configure the following eCommerce events for transmission to Google Tag Manager → Google Ads / GA4:
view_item
add_to_cart
begin_checkout
purchase
These events should be transmitted via dataLayer at the appropriate locations on the website.
1. view_item Event
When it triggers: when opening the product page.
Code example:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "view_item",
ecommerce: {
items: [{
item_id: "12345",
item_name: "Product Name",
price: 999.99,
quantity: 1
}]
}
});
What needs to be transmitted:
item_id — unique product ID
item_name — product name
price — price
quantity — quantity (usually 1 for product view)
2. add_to_cart Event
When it triggers: after clicking the "add to cart" button.
Code example:
window.dataLayer.push({
event: "add_to_cart",
ecommerce: {
items: [{
item_id: "12345",
item_name: "Product Name",
price: 999.99,
quantity: 1
}]
}
});3. begin_checkout Event
When it triggers: when proceeding to the checkout page.
Code example:
window.dataLayer.push({
event: "begin_checkout",
ecommerce: {
items: [
{
item_id: "12345",
item_name: "Product Name",
price: 999.99,
quantity: 2
},
{
item_id: "67890",
item_name: "Other Product",
price: 499.50,
quantity: 1
}
]
}
});4. purchase Event
When it triggers: after successful order placement (on the thank you page).
Code example:
window.dataLayer.push({
event: "purchase",
ecommerce: {
transaction_id: "T1234567890",
value: 1998.48,
currency: "UAH",
items: [
{
item_id: "12345",
item_name: "Product Name",
price: 999.99,
quantity: 2
}
]
}
});Fields that must be transmitted:
transaction_id — unique order number
value — total purchase amount
currency — currency (UAH, USD, etc.)
items[] — list of all products in the order
Implementation requirements:
Data must be dynamically filled from CMS/backend.
Events should be transmitted only once at the appropriate location.
Test each event in Google Tag Assistant and GTM Preview mode.
Work results
Client's review of cooperation with Dmitry Thorzhevsky
Adding eCommerce events to the websiteProfessional approach, found mistakes - fixed them. Did everything promptly and so quality. Glad that I chose this specialist:)
Freelancer's review of cooperation with Yurii Bilevtsov
Adding eCommerce events to the websiteAll is well!
An adequate, understanding client
-
4429 80 1 4 Trust a professional with over 10 years of experience! Rates and deadlines are current!
I will be glad to cooperate!
Experience in commercial development of online stores on CMS, business portals, and corporate websites - 11 years!
+CMS: WordPress (+WooCommerce), PrestaShop / OpenCart / Joomla / Bitrix / MODX / DLE / Shopify
php/html/css/js/MySQL, Photoshop/Figma
Examples of work (from scratch turnkey):
https://wildandorganic.com/
https://cryptosignals.org/
https://www.grower.com.ua/
… https://www.alternativemedicine.com.ua/
https://silkkiss.ua/
https://nordtrade.online/
https://v12coffee.com.ua/franchise/
https://smrtalgo.com/
https://sengero.no/
https://beautybysim.no/
https://sonatagalleri.com/
https://www.solmy-realestate.com/
https://www.emmanuel.com.ua/
https://www.onsitecomputersinc.com/
https://express-tehbud.com/
https://korostenporcelain.com.ua/
https://sladok.com.ua/
https://pricemds.com/
https://picupmedia.com/
https://www.serasar.com/
https://integrisit.com/
-
6900 102 0 Good day, my web development experience is over 11 years, I will do it as high quality as possible, contact me, thank you.
-
3340 101 4 3 I can do it, I have done this many times, it's a typical task, write to me
-
5756 264 0 Good evening, no problem, I will set up the events, I have experience, contact me
-
1618 18 1 1 Hello.
I can implement the task. I have experience in similar projects. The deadlines and cost are approximate - need to discuss the details.
Write, I will do everything quickly and efficiently.
-
691 8 0 I can do it. Write, and I will do it.
+++++++++++++++++++++++++++++++++
-
756 26 1 I will do+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Current freelance projects in the category Content Management Systems
DevOps / System Administrator for migrating and securing a WordPress siteWe are looking for an experienced DevOps engineer or system administrator for a one-time project with the possibility of further technical support. We have a main commercial website on WordPress. It is currently hosted on shared hosting, and recently we have been facing an… Content Management Systems, Web Programming ∙ 5 hours 34 minutes back ∙ 20 proposals |
Improvement of the Simple Pass module for OpenCart
56 USD
Good day, what needs to be done Problem: the basic functionality of the module allows parsing promotional prices, but the dates of promotions can only be set manually before parsing. What needs to be done: 1) Improve the ability to parse the start and end dates of promotions. 2)… Content Management Systems ∙ 6 hours 55 minutes back ∙ 12 proposals |
Development of a website for an online store.Interested in developing a website for an online store. Need a system: online store (up to 2000 products, initially less), 10–20 SEO-oriented landing pages, integrations with 1C and AI services. Content Management Systems, Web Programming ∙ 10 hours 38 minutes back ∙ 71 proposals |
Refinement of the Front-end e-commerce site on OpencartNeed to refine the front-end of an e-commerce site on OpenCart. Main tasks: fix visual bugs, ensure responsiveness for mobile devices, improve the display of product cards, categories, cart, and checkout page. Neat layout is expected, maintaining the current design, and correct… Content Management Systems, Web Programming ∙ 1 day 3 hours back ∙ 52 proposals |
SEO/GEO full-cycle architect for WordPress (Bricks) — niche export sites EN: Full-cycle SEO/GEOAbout us. KOLEO is a manufacturing and construction company specializing in wooden house building (Ukraine, 20+ years, 300+ projects in 35+ countries). We are entering export markets through a series of niche websites. We are looking for specialists whose websites actually rank… Content Management Systems, Search Engine Optimization (SEO) ∙ 1 day 5 hours back ∙ 15 proposals |