Skip to content

Commit

Permalink
Merge pull request #2 from tagconcierge/bugfix/gtm-body-snippet-missi…
Browse files Browse the repository at this point in the history
…ng-noscript

Bugfix/gtm body snippet missing noscript
  • Loading branch information
mfrankiewicz authored Apr 19, 2023
2 parents c53a33b + 1ba54aa commit 606366d
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Change Log
All notable changes to this project will be documented in this file.

## [1.0.1] - 2023-04-19
GTM body snippet should be provided again in module configuration after upgrade.

### Added

### Changed

### Fixed
- [issue #1](https://github.com/tagconcierge/tc-prestashop-module-free/issues/1) -
missing `<noscript>` tag in GTM body snippet after configuration save

## [1.0.0] - 2023-04-18

Initial release.

### Added

### Changed

### Fixed
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,39 @@
# Tag Concierge PrestaShop Module Free
This extension pushes standard eCommerce information – **GA4 Commerce and UA Enhanced eCommerce compatible** – to GTM Data Layer. Once this information is available in your GTM workspace you can plug in and use any tool available, even if you are unsure which tool you need or would like to use.

![image](https://user-images.githubusercontent.com/18583662/232718044-5496a26e-553c-4231-bba8-ddbec06e0c55.png)

GTM setup can be cumbersome and time-consuming – this extension comes with packaged presets for 4 main tools in the market that allow you to set up and run the integration in few simple steps without creating every single GTM Variable and Trigger yourself.

![gif](https://user-images.githubusercontent.com/18583662/232718426-4fec6b72-7bba-4b48-be29-00a438385847.gif)

Tag Concierge integrates your PrestaShop shop with a GTM container. It can work with existing GTM installation and allows injecting the GTM snippets in the settings.

![image](https://user-images.githubusercontent.com/18583662/232718949-ea27f1d3-06d0-45e6-9d2e-b10e6df2c78d.png)

The extension starts to work without any additional installation. Once it is activated and GTM is embedded in the website, it starts to emit eCommerce events to the GTM dataLayer. Those events are compatible with the newest GA4 format but can be adapted to different tools, including UA and Facebook Pixel.

![image](https://user-images.githubusercontent.com/18583662/232719076-bb557af4-abae-4e30-a3e2-220a48f96c8e.png)

![image](https://user-images.githubusercontent.com/18583662/232719118-9a17b117-3de5-49a3-8834-f5bad1fe2d3d.png)

From there, virtually any integration can be achieved through GTM and the same data from your shop can be sent out to any analytical or optimization tool.
But to make it easier, the extension comes with **packaged GTM presets** that can be imported into GTM workspace to enable dataflow to specific tool in few simple steps without creating every single GTM Tag, Variable, and Trigger manually.

![image](https://user-images.githubusercontent.com/18583662/232719541-3ca2bb80-dbd9-4773-a215-81a046c48a7d.png)

That’s it. With the help of the extension and packaged presets, you can start analyzing and optimizing your PrestaShop shop in almost no time.

![image](https://user-images.githubusercontent.com/18583662/232719590-bd041a18-cfcc-44a3-88a1-0911314f7911.png)

See [**our documentation**](https://tagconcierge.com/tag-concierge-for-prestashop) for the list of all supported events.

## Benefits
1. A single extension to install that captures and emits all required eCommerce events
2. Virtually any analytical and optimization tool can be integrated via GTM in order to improve PrestaShop sales
3. Build full end-to-end integration with selected tools (Google Analytics GA4 and UA, Facebook Pixel, Google Ads) with a few simple clicks thanks to packaged GTM presets
4. Supports legally required user consent before sending out any data out (requires manual setup)
5. Ensures data consistency – data won’t be sent twice thanks to streamlined integration

## Requirements
Minimum PHP version: 7.1
9 changes: 8 additions & 1 deletion tagconciergefree.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function __construct()
{
$this->name = 'tagconciergefree';
$this->author = 'Tag Concierge';
$this->version = '1.0.0';
$this->version = '1.0.1';
$this->ps_versions_compliancy = ['min' => '1.7.1.0', 'max' => _PS_VERSION_];
$this->bootstrap = true;
$this->tab = 'advertising_marketing';
Expand Down Expand Up @@ -101,6 +101,11 @@ public function getContent(): string
$output = '';

if (Tools::isSubmit('submit_tc')) {
// get actual value of PS_USE_HTMLPURIFIER
$usePurifier = PrestaShopConfiguration::get('PS_USE_HTMLPURIFIER');
// disable it to allow store gtm snippets in configuration
PrestaShopConfiguration::updateValue('PS_USE_HTMLPURIFIER', 0);

$state = Tools::getValue(ConfigurationVO::STATE);
$containerHead = Tools::getValue(ConfigurationVO::GTM_CONTAINER_SNIPPET_HEAD);
$containerBody = Tools::getValue(ConfigurationVO::GTM_CONTAINER_SNIPPET_BODY);
Expand All @@ -123,6 +128,8 @@ public function getContent(): string

$output .= $this->displayConfirmation('Settings updated.');
}
// restore original value of PS_USE_HTMLPURIFIER
PrestaShopConfiguration::updateValue('PS_USE_HTMLPURIFIER', $usePurifier);
}

$helper = new HelperForm();
Expand Down

0 comments on commit 606366d

Please sign in to comment.