Skip to content

Commit

Permalink
updates M2 klaviyo.js url
Browse files Browse the repository at this point in the history
  • Loading branch information
cykolln committed Sep 17, 2024
1 parent 5344d12 commit 7d3dedf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- BEGIN RELEASE NOTES -->
### [Unreleased]

### [4.2.0] - 2024-09-17

#### Added
- Adds StoreID field to Viewed Product events

#### Changed
- Updates StoreId field to StoreID for Added to Cart events
- Updated the klaviyo onsite javascript to the new url format

### [4.1.4] - 2024-05-22

Expand Down Expand Up @@ -293,7 +296,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- END RELEASE NOTES -->
<!-- BEGIN LINKS -->
[Unreleased]: https://github.com/klaviyo/magento2-klaviyo/compare/4.1.4...HEAD
[Unreleased]: https://github.com/klaviyo/magento2-klaviyo/compare/4.2.0...HEAD
[4.2.0]: https://github.com/klaviyo/magento2-klaviyo/compare/4.1.4...4.2.0
[4.1.4]: https://github.com/klaviyo/magento2-klaviyo/compare/4.1.3...4.1.4
[4.1.3]: https://github.com/klaviyo/magento2-klaviyo/compare/4.1.2...4.1.3
[4.1.2]: https://github.com/klaviyo/magento2-klaviyo/compare/4.1.1...4.1.2
Expand Down
2 changes: 1 addition & 1 deletion composer.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "klaviyo/magento2-extension-dev",
"description": "The local development composer file. This is used for local and continuous integration setup/testing.",
"type": "magento2-module",
"version": "4.1.4",
"version": "4.2.0",
"autoload": {
"psr-4": {
"Klaviyo\\Reclaim\\": ""
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "klaviyo/magento2-extension",
"description": "Klaviyo extension for Magento 2. Allows pushing newsletters to Klaviyo's platform and more.",
"type": "magento2-module",
"version": "4.1.4",
"version": "4.2.0",
"autoload": {
"files": [
"registration.php"
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Klaviyo_Reclaim" setup_version="4.1.4" schema_version="4.1.4">
<module name="Klaviyo_Reclaim" setup_version="4.2.0" schema_version="4.2.0">
<sequence>
<module name="Magento_Customer"/>
<module name="Magento_Checkout"/>
Expand Down
5 changes: 3 additions & 2 deletions view/frontend/templates/analytics/initialize.phtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?php $klaviyoKey = $this->getPublicApiKey(); ?>
<?php if ( $this->isKlaviyoEnabled() && $klaviyoKey ): ?>
<script type="application/javascript" async
src="https://static.klaviyo.com/onsite/js/klaviyo.js?company_id=<?= $block->escapeHtml($klaviyoKey); ?>"></script>
<?php $escapedKey = $block->escapeHtml($klaviyoKey); $klaviyoSrc = 'https://static.klaviyo.com/onsite/js/'. $escapedKey . '/klaviyo.js'?>
<script type="application/javascript" async
src=<?php echo $klaviyoSrc ?> ></script>

<script type="text/x-magento-init">
{
Expand Down

0 comments on commit 7d3dedf

Please sign in to comment.