Installing Google Analytics (M2) - from Fooman website
Note: These instructions apply to installing an extension downloaded from the Fooman website only. If you downloaded the extension from the Magento Marketplace, follow these installation instructions instead.
Essential Info
If you are installing extensions all the time and you have an existing process for installing extensions this is the info you will need:
composer require fooman/googleanalyticsplus-m2:^4.0 bin/magento module:enable --clear-static-content Fooman_GoogleAnalyticsPlus
Option 1: The easy option (using the ExtDN Installer)
The Installer will take you through a set of automated tests and check for common issues before proceeding with the installation. From a command line in your Magento root folder run (all one line):
sh -ic "$(curl -sS https://raw.githubusercontent.com/extdn/installer-m2/master/bin/oneliner.sh)" -- install fooman/googleanalyticsplus-m2:^4.0
Option 2: The manual option (using packagist.org)
From a command line in your Magento root folder run
composer require fooman/googleanalyticsplus-m2:^4.0 bin/magento module:enable --clear-static-content Fooman_GoogleAnalyticsPlus bin/magento setup:upgrade
If you are using Production Mode please also run
bin/magento setup:static-content:deploy bin/magento setup:di:compile
Option 3: The manual option (Self-Hosted Repository)
1. Unzip the zip file you downloaded from our store into the following folder (please create this folder if it’s not already present):
MAGENTO_ROOT/vendor/fooman/packages
2. From a command line in your Magento root folder run
1. composer config repositories.foomanartifacts artifact $(pwd)/vendor/fooman/packages 2. composer require fooman/googleanalyticsplus-m2:^4.0 3. bin/magento module:enable --clear-static-content Fooman_GoogleAnalyticsPlus 4. bin/magento setup:upgrade
If you are using Production Mode please also run
5. bin/magento setup:static-content:deploy 6. bin/magento setup:di:compile