@blotoutio/providers-google-analytics-4-sdk
Advanced tools
Comparing version 0.12.0 to 0.13.0
62
index.js
@@ -40,5 +40,7 @@ var ProvidersGoogleAnalytics4Sdk = (function () { | ||
item_id: content.id, | ||
item_name: content.title, | ||
quantity: content.quantity || 1, | ||
}; | ||
if (content.title) { | ||
data['item_name'] = content.title; | ||
} | ||
if (content.category) { | ||
@@ -71,2 +73,58 @@ data['item_category'] = content.category; | ||
} | ||
case 'ViewCart': { | ||
return { | ||
event: 'view_cart', | ||
eventData: { | ||
currency: data['currency'], | ||
value: data['value'], | ||
items: getItems(data['contents']), | ||
}, | ||
}; | ||
} | ||
case 'RemoveFromCart': { | ||
return { | ||
event: 'remove_from_cart', | ||
eventData: { | ||
currency: data['currency'], | ||
value: data['value'], | ||
items: getItems(data['contents']), | ||
}, | ||
}; | ||
} | ||
case 'AddToWishlist': { | ||
return { | ||
event: 'add_to_wishlist', | ||
eventData: { | ||
currency: data['currency'], | ||
value: data['value'], | ||
items: getItems(data['contents']), | ||
}, | ||
}; | ||
} | ||
case 'ViewList': { | ||
return { | ||
event: 'view_item_list', | ||
eventData: { | ||
item_list_name: data['listName'], | ||
item_list_id: data['listId'], | ||
items: getItems(data['contents']), | ||
}, | ||
}; | ||
} | ||
case 'Login': { | ||
return { | ||
event: 'login', | ||
eventData: { | ||
method: data['method'], | ||
}, | ||
}; | ||
} | ||
case 'SignUp': { | ||
return { | ||
event: 'sign_up', | ||
eventData: { | ||
method: data['method'], | ||
}, | ||
}; | ||
} | ||
case 'AddToCart': { | ||
@@ -190,3 +248,3 @@ return { | ||
loaded: isLoaded, | ||
sdkVersion: "0.12.0" , | ||
sdkVersion: "0.13.0" , | ||
}; | ||
@@ -193,0 +251,0 @@ }; |
{ | ||
"name": "@blotoutio/providers-google-analytics-4-sdk", | ||
"version": "0.12.0", | ||
"version": "0.13.0", | ||
"description": "Google Analytics 4 Browser SDK for EdgeTag", | ||
@@ -5,0 +5,0 @@ "author": "Blotout", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9252
262