Loading...
Loading...
Compare original and translation side by side
// Example: GA4 Configuration Tag
Tag Type: Google Analytics: GA4 Configuration
Measurement ID: G-XXXXXXXXXX
Trigger: All Pages// Example: GA4 Configuration Tag
Tag Type: Google Analytics: GA4 Configuration
Measurement ID: G-XXXXXXXXXX
Trigger: All Pages// Push custom event to data layer
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'event': 'custom_event',
'category': 'engagement',
'action': 'button_click',
'label': 'CTA Button'
});// Push custom event to data layer
window.dataLayer = window.dataLayer || [];
dataLayer.push({
'event': 'custom_event',
'category': 'engagement',
'action': 'button_click',
'label': 'CTA Button'
});User Action --> Trigger Fires --> Tag Executes --> Data Sent
^ |
| v
+--- Variables provide values -------+用户操作 --> 触发器触发 --> 代码标签执行 --> 数据发送
^ |
| v
+--- 变量提供所需值 ----------------+form_submitform_submit// Use var instead of const/let
var myVar = 'value';
// Use function instead of arrow functions
var myFunc = function(x) { return x * 2; };
// Use string concatenation instead of template literals
var message = 'Hello, ' + name;// Use var instead of const/let
var myVar = 'value';
// Use function instead of arrow functions
var myFunc = function(x) { return x * 2; };
// Use string concatenation instead of template literals
var message = 'Hello, ' + name;undefinedundefinedundefinedundefined[Platform] - [Type] - [Description]GA4 - Event - Form SubmitGoogle Ads - Conversion - PurchaseFB - Pixel - Page View[平台] - [类型] - [描述]GA4 - Event - Form SubmitGoogle Ads - Conversion - PurchaseFB - Pixel - Page View[Event Type] - [Description]Click - CTA ButtonPage View - HomepageForm Submit - Contact Form[事件类型] - [描述]Click - CTA ButtonPage View - HomepageForm Submit - Contact Form[Type] - [Description]DL - User IDCJS - Format PriceConstant - GA4 Measurement ID[类型] - [描述]DL - User IDCJS - Format PriceConstant - GA4 Measurement ID// Page view
window.dataLayer.push({ 'event': 'page_view' });
// User login
window.dataLayer.push({ 'event': 'login', 'method': 'Google' });
// Purchase
window.dataLayer.push({
'event': 'purchase',
'ecommerce': {
'transaction_id': 'T12345',
'value': 99.99,
'currency': 'AUD',
'items': [...]
}
});// Page view
window.dataLayer.push({ 'event': 'page_view' });
// User login
window.dataLayer.push({ 'event': 'login', 'method': 'Google' });
// Purchase
window.dataLayer.push({
'event': 'purchase',
'ecommerce': {
'transaction_id': 'T12345',
'value': 99.99,
'currency': 'AUD',
'items': [...]
}
});| Topic | Reference File |
|---|---|
| Container setup | setup.md |
| Tag configuration | tags.md |
| Trigger configuration | triggers.md |
| Variable configuration | variables.md |
| Data layer | datalayer.md |
| Debugging | debugging.md |
| Best practices | best-practices.md |
| Custom templates | custom-templates.md |
| API automation | api.md |
| 主题 | 参考文件 |
|---|---|
| 容器设置 | setup.md |
| 代码标签配置 | tags.md |
| 触发器配置 | triggers.md |
| 变量配置 | variables.md |
| 数据层 | datalayer.md |
| 调试 | debugging.md |
| 最佳实践 | best-practices.md |
| 自定义模板 | custom-templates.md |
| API自动化 | api.md |