Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The virtual pageviews code tells Google Analytics or any other tracking what page the checkout process is up to; the names of each virtual pageview are:

UA:

  • ga('send', 'pageview', 'payments/pages/contact.php');

  • ga('send', 'pageview', 'payments/pages/freight.php');

  • ga('send', 'pageview', 'payments/pages/confirm.php'); OR ga('send', 'pageview', 'payments/pages/confirm_creditcard.php');

  • ga('send', 'pageview', 'payments/pages/complete.php'); OR ga('send', 'pageview', 'payments/pages/complete_creditcard.php'); 

...

  • /payments/pages/complete.php – Is the final URL for completed purchases using other payment methods (Direct Deposit, Credit Card by Phone, and On Account and PayPal).

  • /payments/pages/complete_creditcard.php – The final URL for completed purchases using credit card only.

GA4:

  • gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/contact.php'});

  • gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/freight.php'});

  • gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/confirm.php'}); OR gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/confirm_creditcard.php'});

  • gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/complete.php'}); OR gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/complete_creditcard.php'}); 

So:

  • payments/pages/confirm.php – Is the page shown when the website user has chosen to complete purchases using other payment methods (Direct Deposit, Credit Card by Phone, and On Account).

  • payments/pages/confirm_creditcard.php – Is the page shown when the website user has chosen credit card only.

GA4 with Single Page Checkout:

  • gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/contact.php'});

  • gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/freight.php'});

  • gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/terms.php'});

  • gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/confirm.php'}); OR gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/confirm_creditcard.php'});

  • gtag('config', '{$AnalyticsAccountCode}', {'page_path': 'payments/pages/complete.php'});

So:

  • payments/pages/confirm.php – Is the page shown when the website user has chosen to complete purchases using other payment methods (Direct Deposit, Credit Card by Phone, and On Account).

  • payments/pages/confirm_creditcard.php – Is the page shown when the website user has chosen credit card only.

NOTE: “pageviews” are currently setup Google Analytics needs to be enabled in the Global Parameters of your website in order for either the UA or GA4 code to be included in page source generated on your website.