prestashopcorp / psxmarketingwithgoogle
PrestaShop Essentials - Promote your products on Google
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 11
Forks: 12
Language:TypeScript
Type:prestashop-module
Requires
- php: >=7.2
- brick/phonenumber: ^0.4.1
- prestashop/module-lib-faq: ^2.0
- prestashop/module-lib-service-container: ^2.0
- prestashop/prestashop-accounts-installer: dev-main
- prestashopcorp/module-lib-billing: ^3.3
- segmentio/analytics-php: ^1.5
- sentry/sentry: ^1.11
- symfony/polyfill-php80: ^1.23.1
- vlucas/phpdotenv: ^3.4
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^8.5
- prestashop/php-dev-tools: ^4.2
- dev-master
- v1.75.0-beta.1
- v1.74.10
- v1.74.10-beta.2
- v1.74.10-beta.1
- v1.74.9
- v1.74.9-beta.1
- v1.74.8
- v1.74.8-beta.4
- v1.74.8-beta.3
- v1.74.8-beta.2
- v1.74.8-beta.1
- v1.74.7
- v1.74.7-beta.3
- v1.74.7-beta.2
- v1.74.7-beta.1
- v1.74.6
- v1.74.6-beta.2
- v1.74.6.beta-1
- v1.74.5.beta-3
- v1.74.5.beta-2
- v1.74.5.beta-1
- v1.74.4
- v1.74.4.beta-9
- v1.74.4.beta-8
- v1.74.4.beta-7
- v1.74.4.beta-6
- v1.74.4.beta-5
- v1.74.4.beta-4
- v1.74.4.beta-3
- v1.74.4.beta-2
- v1.74.4.beta-1
- v1.74.3
- v1.74.3-beta.2
- v1.74.3-beta.1
- v1.74.2
- v1.74.1
- v1.74.1-beta.1
- v1.74.0
- v1.74-beta.14
- v1.74-beta.13
- v1.74-beta.12
- v1.74-beta.11
- v1.74-beta.10
- v1.74-beta.9
- v1.74-beta.8
- v1.74-beta.7
- v1.74-beta.6
- v1.74-beta.5
- v1.74-beta.4
- v1.74-beta.3
- v1.74-beta.2
- v1.74-beta.1
- v1.73.3
- v1.73.3-beta.4
- v1.73.3-beta.3
- v1.73.3-beta.2
- v1.73.3-beta.1
- v1.73.2
- v1.73.2-beta.12
- v1.73.2-beta.11
- v1.73.2-beta.10
- v1.73.2-beta.9
- v1.73.2-beta.8
- v1.73.2-beta.7
- v1.73.2-beta.6
- v1.73.2-beta.5
- v1.73.2-beta.4
- v1.73.2-beta.3
- v1.73.2-beta.2
- v1.73.2-beta.1
- v1.73.1
- v1.73.0
- v1.73.0-beta.5
- v1.73.0-beta.4
- v1.73.0-beta.3
- v1.73.0-beta.2
- v1.73.0-beta.1
- v1.72.0-beta.20
- v1.72.0-beta.19
- v1.72.0-beta.18
- v1.72.0-beta.17
- v1.72.0-beta.16
- v1.72.0-beta.15
- v1.72.0-beta.14
- v1.72.0-beta.13
- v1.72.0-beta.12
- v1.72.0-beta.11
- v1.72.0-beta.10
- v1.72.0-beta.9
- v1.72.0-beta.8
- v1.72.0-beta.7
- v1.72.0-beta.6
- v1.72.0-beta.5
- v1.72.0-beta.4
- v1.72.0-beta.3
- v1.72.0-beta.2
- v1.72.0-beta.1
- 1.71.1
- v1.71.1-beta.1
- v1.71.0
- v1.71.0-beta.14
- v1.71.0-beta.13
- v1.71.0-beta.12
- v1.71.0-beta.11
- v1.71.0-beta.10
- v1.71.0-beta.9
- v1.71.0-beta.8
- v1.71.0-beta.7
- v1.71.0-beta.6
- v1.71.0-beta.5
- v1.71.0-beta.4
- v1.71.0-beta.3
- v1.71.0-beta.2
- v1.71.0-beta.1
- v1.70.0
- v1.70.0-beta.2
- v1.70.0-beta.1
- v1.69.0
- v1.69.0-beta.1
- v1.68.0
- v1.68.0-beta.1
- v1.67.0
- v1.67.0-beta.3
- v1.67.0-beta.2
- v1.67.0-beta.1
- v1.67.0-beta.0
- v1.66.0
- v1.66.0-beta.5
- v1.66.0-beta.4
- v1.66.0-beta.3
- v1.66.0-beta.2
- v1.66.0-beta.1
- v1.65.1
- v1.65.1-beta.3
- v1.65.1-beta.2
- v1.65.1-beta.1
- v1.65.0
- v1.65.0-beta.5
- v1.65.0-beta.4
- v1.65.0-beta.3
- v1.65.0-beta.2
- v1.65.0-beta.1
- v1.64.0
- v1.64.0-beta.5
- v1.64.0-beta.4
- v1.64.0-beta.3
- v1.64.0-beta.2
- v1.64.0-beta.1
- v1.63.0
- v1.63.0-beta.2
- v1.63.0-beta.1
- v1.62.0-beta.7
- v1.62.0-beta.6
- v1.62.0-beta.5
- v1.62.0-beta.4
- v1.62.0-beta.3
- v1.62.0-beta.2
- v1.62.0-beta.1
- v1.61.1
- v1.61.1-beta.1
- v1.61.0
- v1.61.0-beta.2
- v1.61.0-beta.1
- v1.60.1
- v1.60.0
- v1.60.0-beta.11
- v1.60.0-beta.10
- v1.60.0-beta.9
- v1.60.0-beta.8
- v1.60.0-beta.7
- v1.60.0-beta.6
- v1.60.0-beta.5
- v1.60.0-beta.4
- v1.60.0-beta.3
- v1.60.0-beta.2
- v1.60.0-beta.1
- v1.59.0
- v1.59.0-beta.1
- v1.58.0-beta.2
- v1.58.0-beta.1
- v1.57.0
- v1.57.0-beta.1
- v1.56.1
- v1.56.0
- v1.56.0-beta.4
- v1.56.0-beta.3
- v1.56.0-beta.2
- v1.56.0-beta.1
- v1.55.0
- v1.55.0-beta.2
- v1.55.0-beta.1
- v1.54.0
- v1.54.0-beta.1
- v1.53.0
- v1.53.0-beta.11
- v1.53.0-beta.10
- v1.53.0-beta.9
- v1.53.0-beta.8
- v1.53.0-beta.7
- v1.53.0-beta.6
- v1.53.0-beta.5
- v1.53.0-beta.4
- v1.53.0-beta.3
- v1.53.0-beta.2
- v1.53.0-beta.1
- v1.52.0
- v1.52.0-beta.2
- v1.52.0-beta.1
- v1.51.0
- v1.51.0-beta.8
- v1.51.0-beta.7
- v1.51.0-beta.6
- v1.51.0-beta.5
- v1.51.0-beta.4
- v1.51.0-beta.3
- v1.51.0-beta.2
- v1.51.0-beta.1
- v1.50.0
- v1.50.0-beta.2
- 1.50.0-beta.1
- v1.49.0
- v1.49.0-beta.2
- v1.49.0-beta.1
- v1.48.0
- v1.48.0-beta.1
- v1.47.0
- v1.47.0-beta.1
- v1.46.0
- v1.46.0-beta.4
- v1.46.0-beta.3
- v1.46.0-beta.2
- v1.46.0-beta.1
- v1.45.0
- v1.45.0-beta.5
- v1.45.0-beta.4
- v1.45.0-beta.3
- v1.45.0-beta.2
- v1.45.0-beta.1
- v1.44.1
- v1.44.1-beta-1
- v1.44.0
- v1.44.0-beta.1
- v1.43.0
- v1.42.0
- v1.42.0-beta.4
- v1.42.0-beta.3
- v1.42.0-beta.2
- v1.42.0-beta.1
- v1.41.0
- v1.41.0-beta.4
- v1.41.0-beta.3
- v1.41.0-beta.2
- v1.41.0-beta.1
- v1.40.0
- v1.40.0-beta.3
- v1.40.0-beta.2
- v1.40.0-beta.1
- v1.39.0
- v1.39.0-beta.1
- v1.38.0
- v1.38.0-beta.1
- v1.37.1
- v1.37.0
- v1.37.0-beta.2
- v1.37.0-beta.1
- v1.36.0
- v1.36.0-beta.2
- v1.36.0-beta.1
- v1.35.0
- v1.35.0-beta.1
- v1.34.0
- v1.34.0-beta.2
- v1.34.0-beta.1
- v1.33.1
- v1.33.0
- v1.33.0-beta.1
- v1.32.0
- v1.32.0-beta.9
- v1.32.0-beta.8
- v1.32.0-beta.7
- v1.32.0-beta.6
- v1.32.0-beta.5
- v1.32.0-beta.4
- v1.32.0-beta.3
- v1.32.0-beta.2
- v1.32.0-beta.1
- v1.31.0
- v1.31.0-beta.11
- v1.31.0-beta.10
- v1.31.0-beta.9
- v1.31.0-beta.8
- v1.31.0-beta.7
- v1.31.0-beta.6
- v1.31.0-beta.5
- v1.31.0-beta.4
- v1.31.0-beta.3
- v1.31.0-beta.2
- v1.31.0-beta.1
- v1.30.0
- v1.30.0-beta.2
- v1.30.0-beta.1
- v1.29.0
- v1.29.0-beta.1
- v1.28.0
- v1.28.0-beta.4
- v1.28.0-beta.3
- v1.28.0-beta.2
- v1.28.0-beta.1
- v1.27.1
- v1.27.0
- v1.27.0-beta.1
- v1.26.0
- v1.25.0
- v1.25.0-beta.6
- v1.25.0-beta.5
- v1.25.0-beta.4
- v1.25.0-beta.3
- v1.25.0-beta.2
- v1.25.0-beta.1
- v1.24.0
- v1.24.0-beta.5
- v1.24.0-beta.4
- v1.24.0-beta.3
- v1.24.0-beta.2
- v1.24.0-beta.1
- v1.23.1
- v1.23.0
- v1.22.0
- v1.21.0-beta.4
- v1.21.0-beta.3
- v1.21.0-beta.2
- v1.21.0-beta.1
- v1.20.0
- v1.20.0-beta.6
- v1.20.0-beta.5
- v1.20.0-beta.4
- v1.20.0-beta.3
- v1.20.0-beta.2
- v1.20.0-beta.1
- v1.19.0
- v1.19.0-beta.1
- v1.18.0
- v1.18.0-beta.6
- v1.18.0-beta.5
- v1.18.0-beta.4
- v1.18.0-beta.3
- v1.18.0-beta.2
- v1.18.0-beta.1
- v1.17.0
- v1.17.0-beta.2
- v1.17.0-beta.1
- v1.16.1
- v1.16.0
- v1.16.0-beta.8
- v1.16.0-beta.7
- v1.16.0-beta.6
- v1.16.0-beta.5
- v1.16.0-beta.4
- v1.16.0-beta.3
- v1.16.0-beta.2
- v1.16.0-beta.1
- v1.15.2
- v1.15.1
- v1.15.0
- v1.15.0-beta.9
- v1.15.0-beta.8
- v1.15.0-beta.7
- v1.15.0-beta.6
- v1.15.0-beta.5
- v1.15.0-beta.4
- v1.15.0-beta.3
- v1.15.0-beta.2
- v1.15.0-beta.1
- v1.14.0
- v1.13.0
- v1.13.0-beta.5
- v1.13.0-beta.4
- v1.13.0-beta.3
- v1.13.0-beta.2
- v1.13.0-beta.1
- v1.12.3
- v1.12.2
- v1.12.1
- v1.12.0
- v1.12.0-beta.3
- v1.12.0-beta.2
- v1.12.0-beta.1
- v1.11.0
- v1.11.0-beta.7
- v1.11.0-beta.6
- v1.11.0-beta.5
- v1.11.0-beta.4
- v1.11.0-beta.3
- v1.11.0-beta.2
- v1.11.0-beta.1
- v1.10.4
- v1.10.3
- v1.10.2
- v1.10.1
- v1.10.0
- v1.9.0
- v1.8.2
- v1.8.1
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.1
- v1.2.0
- v1.2.0-beta.16
- v1.2.0-beta.15
- v1.2.0-beta.14
- v1.2.0-beta.13
- v1.2.0-beta.12
- v1.2.0-beta.11
- v1.2.0-beta.10
- v1.2.0-beta.9
- v1.2.0-beta.8
- v1.2.0-beta.7
- v1.2.0-beta.6
- v1.2.0-beta.5
- v1.2.0-beta.4
- v1.2.0-beta.3
- v1.2.0-beta.2
- v1.2.0-beta.1
- v1.1.3
- v1.1.2-beta11
- v1.1.2-beta10
- v1.1.2-beta9
- v1.1.2-beta8
- v1.1.2-beta7
- v1.1.2-beta6
- v1.1.2-beta5
- v1.1.2-beta4
- v1.1.1-beta3
- v1.1.1-beta2
- v1.1.1-beta1
- v1.1.0-beta6
- v1.1.0-beta5
- v1.1.0-beta.3
- v1.0.0-beta.2
- 1.0.0-beta.1
- dev-l10n_master
- dev-dependabot/composer/symfony/process-5.4.46
This package is auto-updated.
Last update: 2024-12-12 10:22:48 UTC
README
Marketing With Google (psxmarketingwithgoogle)
About
Sync your product catalog with Google
Connect your store to Google Merchant Center and synchronize your entire product catalog in a few clicks. Product attributes such as price and availability will be automatically updated everyday.
Enable free listings for your products
Free listings allow to show your product attributes, including image and price in organically-ranked listings on the Shopping tab.
Once your catalog has been synchronised, enable free listings on your dashboard and start showing your products on the Shopping tab for free.
Boost your reach and sales with Performance Max
Want to maximize your campaign performance and find the right customers wherever they are? From one single campaign, Performance Max collects data across different Google channels, and optimises your campaign performance by showing where your ads have higher chances of driving conversion.
Download & Installation
Modules archives can be found and downloaded:
- On the PrestaShop Addons Marketplace (Latest stable release only)
- On the releases page of this repository (Stable & beta releases available)
Downloaded archives can be uploaded on PrestaShop instances, as detailed in the user documentation.
Building
This part covers the steps to get this project ready locally.
In order to run on a PrestaShop instance, dependencies needs to be downloaded and the JS application built.
PHP
Retrieve dependencies with composer
composer install
# or
make composer-install
Composer has been configured in authoritative mode, which means it won't look in the filesystem when a class is not found in the current autoloader. When a class is added or deleted, it is required to rerun the above command.
VueJS
With Node 20+, the following commands need to be run in the _dev/
folder and requires pnpm to be installed. If you do not have it:
npm install -g pnpm
To build the application in production mode:
pnpm install
pnpm -r build
# or
make vuejs
To compile and watch for new changes (development mode):
pnpm install
pnpm -r dev
Dev environment
For getting a locally shop with the module installed, you can use the following commands:
make docker-up
It will create a docker container with a PrestaShop instance and the module installed and a phpMyAdmin instance.
You can configure the port for multiple instances & choose a specific version of PrestaShop.
All configuration is in the folder e2e-env
.
Testing
Tests will be run at each commit on this repository or any pull-request. These commands reproduce the checks done by the CI.
- JS checks: Unit tests & coding standards
pnpm -r lint
pnpm -r test:unit
# or
make test-front
- PHP checks: Unit tests, coding standards...
vendor/bin/php-cs-fixer fix
vendor/bin/phpunit tests/
docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop; docker run --rm --volumes-from temp-ps -v $PWD:/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module phpstan/phpstan analyse --configuration=/web/module/tests/phpstan/phpstan.neon;
php vendor/bin/header-stamp --license=vendor/prestashop/header-stamp/assets/afl.txt --exclude=vendor,tests,_dev
# or
make test-back
Environment customization
By default, PHP & JS will define data to the application that are related to the production.
In case you need to modify these variables while maintaining this project, you may
overwrite them in a freshly .env
file created in the root directory of this module, by using the
keys that can be found in classes/config/Config.php
.
- To use the UI built in the
views/
folder, set on your .envUSE_LOCAL_VUE_APP
at 1. - To use the developer environment with hot-reload, set
USE_LIVE_VUE_APP=1
. The template will call the dev server at http://localhost:5173 by default. Customising this value is possible by modifyingapp.tpl
andvite.config.ts
. - To modify the base URL of the API for a local one:
PSX_MKTG_WITH_GOOGLE_API_URL=https://localhost:8080
Other values are managed by the Vue.js application and are provided in the _dev/apps/ui/.env
file, different from the optional .env
in the root folder.
Releasing
QA Review
Each version need to be tested by the QA team before being sent to production.
This step is done once all pull-requests are merged in the base branch (master
for instance).
To create a pre-release:
- Get the new version by following the Semantic Versioning convention (SemVer),
- Check the version in the main class of the module and
config.xml
match the upcoming version, or update the values accordingly, - Start creating a new release on the releases page with a tag that matches the version provided in the main class in the format
v1.XX.XX-beta.XX
. - Make sure to check the option "Set as a pre-release"
- A proposal of change-log can be generated by GitHub to list all the merged pull-requests since the previous release. This list can be relevant for the QA team and can be sent as-is.
- Publish the release.
When created, several zip files will be attached to the release. Each of them is linked to a specific API environment (production, pre-production or integration), and the production zip is the one being sent to the marketplace.
Deploying to production
Publishing on the marketplace can be done by creating a release on GitHub.
To publish a release:
- Use the version from the pre-release or get the new version by following the Semantic Versioning convention (SemVer),
- Check the version in the main class of the module and
config.xml
match the upcoming version, or update the values accordingly, - Start creating a new release on the releases page with a tag that matches the version provided in the main class.
- A proposal of change-log can be generated by GitHub to list all the merged pull-requests since the previous release. Because this change-log will be sent to the marketplace along the archive, it is recommended to make it understandable to merchants.
- Publish the release.
When created, several zip files will be attached to the release. Each of them is linked to a specific API environment (production, pre-production or integration), and the production zip is the one being sent to the marketplace.
Documentation
User help
Documentation is hosted online, and is available in several languages. Translated documentation in your language can be found in the module configuration page, in the "Help" tab.
Storybook
All components and pages of this module are available on a dedicated website running Storybook.
It is updated on each push to the master
branch.
Integration Storybook
Preproduction Storybook
Production Storybook
Warning
In case Storybook fails while loading with an error "Failed to fetch dynamically imported module: [...]/preview-[...].js", disable your ad-blocker and try again.
Hook
The module registers itself to several hooks and adds the following features:
- actionCartUpdateQuantityBefore
- Conversion tracking: Trigger the Conversion Action "Add to Cart"
- displayBackOfficeHeader
- Menu: Fix the display of the Marketing tab
- Website Verification: Trigger the verification & claim process every 30 days in the background of the BO dashboard.
- Warning Messages: Display alerts on the BO dashboard about Marketing With Google
- Warning Messages: Display a notice after the edition of a carrier advising to reconfigure shipping settings on the module
- displayHeader
- Website verification: Display the Google Verification Tag
- Conversion tracking: Display the Google Tag to init gtag()
- Conversion tracking: Provide user data for Enhanced conversions
- Conversion tracking: Purge & display events that could not be displayed (i.e triggered from Ajax requests)
- displayOrderConfirmation
- Conversion tracking: Trigger the Conversion Action "Purchase"
- displayTop
- Conversion tracking: Trigger the Conversion Action "Page view"
Localization
Translated data is stored in the folder _dev/packages/mktg-with-google-common/translations
.
Each hour, Crowdin will run several tasks on the repository:
- Data in the
en/
folder will be synchronized to Crowdin as source strings, - Updates in the translated content on Crowdin will be sent back to the repository with a pull-request.
Contributing
PrestaShop modules are open source extensions to the PrestaShop e-commerce platform. Everyone is welcome and even encouraged to contribute with their own improvements!
Just make sure to follow our contribution guidelines.
Reporting issues
You can report issues with this module by using the link available in the module configuration page, in the "Help" tab.
License
This module is released under the Academic Free License 3.0