PHP code example of ideasonpurpose / wp-google-analytics

1. Go to this page and download the library: Download ideasonpurpose/wp-google-analytics library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ideasonpurpose / wp-google-analytics example snippets


use IdeasOnPurpose\WP\GoogleAnalytics;

new GoogleAnalytics("G-XYZ456", "G-JKL890");

$client_prod_id = "G-XYZ456";
$local_dev_id = "G-JKL890";
new GoogleAnalytics($client_prod_id, $local_dev_id);

new GoogleAnalytics(["UA-012345-1", "G-XYZ456"], $local_dev_id);