-
Copy the contents from 01-base-all-pages.html & paste it on
All Pages
box in the ThriveCart Product Checkout page - ReplaceGTM-xxxxx
with your GTM container ID - Line 12. -
Copy the contents from 02-checkout-page.html & paste it on
Checkout Page
box.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(()=>{l=e=>void 0==e?"":e?"granted":"denied",c=e=>"granted"==e?"color: #0C0":"color: #C00";let e={ad_personalization:"Marketing",ad_storage:"Marketing",ad_user_data:"Marketing",analytics_storage:"Statistics",functionality_storage:"Necessary",security_storage:"Necessary",personalization_storage:"Preferences"};if(!window.google_tag_data){console.warn("No Consent Mode data found");return}var t="ics"in google_tag_data?google_tag_data.ics.entries:null;if(!t){console.log("No Consent Mode data available");return}let a={};Object.keys(t).forEach(t=>{let o=e[t]||"Other";a[o]||(a[o]=[]),a[o].push(t)});let o=Object.keys(a).sort();console.log("%cGoogle Consent Mode v2 Status:","font-size: 1rem");let n=!1;o.forEach(e=>{console.log(`%c | |
${e}:`,"font-weight: bold"),a[e].sort().forEach(e=>{let a=l(t[e].default),o=l(t[e].update);if(""==a&&""==o)return;n=!0;let r=" "+e+":"+(""!=a?"\n Default: %c"+a:"%c")+"%c"+(""!=o?"\n Update: %c"+o:"%c");console.log(r,""!=a?c(a):"","",""!=o?c(o):"","")})}),n||console.log("No default Consent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get the list of available branches | |
available_branches=$(git branch --list) | |
# Prompt to select a branch | |
echo "🌍 Available branches:" | |
echo "$available_branches" | |
read -p "❗ Please enter the branch name to commit to (or press Enter for current branch): " selected_branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"exportFormatVersion": 2, | |
"exportTime": "2022-08-05 10:09:11", | |
"containerVersion": { | |
"path": "accounts/6006227429/containers/90922809/versions/2", | |
"accountId": "6006227429", | |
"containerId": "90922809", | |
"containerVersionId": "2", | |
"name": "[Praba] GA4 Ecommerce Events Boilerplate by MeasureSchool - v1.0", | |
"description": "GA4 Ecommerce Events Boilerplate by MeasureSchool.\n\nFor queries, write to [email protected]", |
- Query #01 - Top 10 events for the past 30 days (excluding today)
- Query #02 - Top 10 events for the past 30 days (including today)
- Query #03 - Unnesting
event_params
to see the pages viewed in a date range. - Query #04 - Removing the query strings from the URL
- Query #05 - Count Users & New Users
- Query #06 - Count users by acquisition campaign
- [Query #07 - Count users by Browsers & Browser versions](https://gist.github.com/prab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function() { | |
var orderData = {{dlv - order-data v1}}; | |
var items = {{dlv - items - v1}}; | |
var actionField = { | |
id: orderData.id, | |
affiliation: orderData.affiliation, | |
revenue: orderData.revenue, | |
shipping: orderData.shipping, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
timestamp_micros(event_timestamp) as timestamp_utc, -- converts the timestamp into UTC | |
format_datetime("%Y-%d-%m %H-%M-%S %Z", (timestamp_micros(event_timestamp)), 'America/New_York') as timestamp_newyork, --timestamp in NY | |
event_name, | |
(select value.string_value from unnest(event_params) where key = 'transaction_id') as transaction_id, -- gets the string value | |
(select value.int_value from unnest(event_params) where key = 'value') as transaction_value, --gets the integer value | |
(select value.string_value from unnest(event_params) where key = 'currency') as currency, | |
(select value.string_value from unnest (event_params) where key = 'page_title') as page_title, | |
(select value.string_value from unnest (event_params) where key = 'page_location') as url | |
Check if jQuery is enabled on the site - running the below snippet on the browser console will return the result.
(function() {
if (window.jQuery) {
// jQuery is loaded
return("Yeah! JQuery loaded");
} else {
// jQuery is not loaded
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function exportToBigQuery() { | |
var projectId = 'learn-big-query-307011'; //GCP Project ID here | |
var datasetId = 'ga_gbq_data_pipeline_demo'; //GBQ Dataset ID | |
var tableId = 'ga_codechilli_users_by_country'; //GBQ Table ID | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var values = spreadsheet.getSheetByName('data').getDataRange().getValues(); | |
var csv = generateCSV(values); |
NewerOlder