Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
"psr/event-dispatcher": "^1.0",
"psr/log": "^1.1 || ^2.0 || ^3.0",
"setono/composite-compiler-pass": "^1.1",
"setono/google-analytics-bundle": "^1.0.0-alpha.6",
"setono/google-analytics-measurement-protocol": "^1.0@alpha",
"setono/google-analytics-bundle": "^2.0@alpha",
"setono/google-analytics-events": "^1.0@beta",
"setono/google-analytics-measurement-protocol": "^2.0@beta",
"sylius/channel": "^1.0",
"sylius/channel-bundle": "^1.0",
"sylius/core": "^1.8",
Expand Down
2 changes: 1 addition & 1 deletion src/Event/ItemResolved.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Setono\SyliusAnalyticsPlugin\Event;

use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\Item\Item;
use Setono\GoogleAnalyticsEvents\Event\Item\Item;

/**
* Is fired when an item has been resolved. Use this to do common manipulations on the item before it's sent to Google
Expand Down
4 changes: 2 additions & 2 deletions src/EventSubscriber/AddPaymentInfoSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\GoogleAnalyticsBundle\Event\ClientSideEvent;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\AddPaymentInfoEvent;
use Setono\GoogleAnalyticsEvents\Event\AddPaymentInfoEvent;
use Setono\SyliusAnalyticsPlugin\Resolver\Items\ItemsResolverInterface;
use Setono\SyliusAnalyticsPlugin\Util\FormatAmountTrait;
use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
Expand Down Expand Up @@ -62,7 +62,7 @@ public function track(ResourceControllerEvent $resourceControllerEvent): void
),
);
} catch (\Throwable $e) {
$this->log(AddPaymentInfoEvent::NAME, $e);
$this->log(AddPaymentInfoEvent::getName(), $e);
}
}
}
4 changes: 2 additions & 2 deletions src/EventSubscriber/AddShippingInfoSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\GoogleAnalyticsBundle\Event\ClientSideEvent;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\AddShippingInfoEvent;
use Setono\GoogleAnalyticsEvents\Event\AddShippingInfoEvent;
use Setono\SyliusAnalyticsPlugin\Resolver\Items\ItemsResolverInterface;
use Setono\SyliusAnalyticsPlugin\Util\FormatAmountTrait;
use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
Expand Down Expand Up @@ -64,7 +64,7 @@ public function track(ResourceControllerEvent $resourceControllerEvent): void
),
);
} catch (\Throwable $e) {
$this->log(AddShippingInfoEvent::NAME, $e);
$this->log(AddShippingInfoEvent::getName(), $e);
}
}
}
4 changes: 2 additions & 2 deletions src/EventSubscriber/AddToCartSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\GoogleAnalyticsBundle\Event\ClientSideEvent;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\AddToCartEvent;
use Setono\GoogleAnalyticsEvents\Event\AddToCartEvent;
use Setono\SyliusAnalyticsPlugin\Resolver\Item\ItemResolverInterface;
use Setono\SyliusAnalyticsPlugin\Util\FormatAmountTrait;
use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
Expand Down Expand Up @@ -71,7 +71,7 @@ public function track(ResourceControllerEvent $resourceControllerEvent): void
),
);
} catch (\Throwable $e) {
$this->log(AddToCartEvent::NAME, $e);
$this->log(AddToCartEvent::getName(), $e);
}
}
}
4 changes: 2 additions & 2 deletions src/EventSubscriber/BeginCheckoutSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\GoogleAnalyticsBundle\Event\ClientSideEvent;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\BeginCheckoutEvent;
use Setono\GoogleAnalyticsEvents\Event\BeginCheckoutEvent;
use Setono\SyliusAnalyticsPlugin\Resolver\Items\ItemsResolverInterface;
use Setono\SyliusAnalyticsPlugin\Util\FormatAmountTrait;
use Sylius\Component\Core\Model\OrderInterface;
Expand Down Expand Up @@ -70,7 +70,7 @@ public function track(RequestEvent $requestEvent): void
),
);
} catch (\Throwable $e) {
$this->log(BeginCheckoutEvent::NAME, $e);
$this->log(BeginCheckoutEvent::getName(), $e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Setono\SyliusAnalyticsPlugin\EventSubscriber;

use Setono\GoogleAnalyticsBundle\Context\ClientIdContextInterface;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\PurchaseEvent;
use Setono\GoogleAnalyticsEvents\Event\PurchaseEvent;
use Setono\SyliusAnalyticsPlugin\Message\Command\SendPurchaseEvent;
use Setono\SyliusAnalyticsPlugin\Resolver\Items\ItemsResolverInterface;
use Setono\SyliusAnalyticsPlugin\Util\FormatAmountTrait;
Expand Down
4 changes: 2 additions & 2 deletions src/EventSubscriber/PurchaseSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\GoogleAnalyticsBundle\Event\ClientSideEvent;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\PurchaseEvent;
use Setono\GoogleAnalyticsEvents\Event\PurchaseEvent;
use Setono\SyliusAnalyticsPlugin\Resolver\Items\ItemsResolverInterface;
use Setono\SyliusAnalyticsPlugin\Util\FormatAmountTrait;
use Sylius\Component\Core\Model\OrderInterface;
Expand Down Expand Up @@ -87,7 +87,7 @@ public function track(RequestEvent $requestEvent): void
),
);
} catch (\Throwable $e) {
$this->log(PurchaseEvent::NAME, $e);
$this->log(PurchaseEvent::getName(), $e);
}
}
}
4 changes: 2 additions & 2 deletions src/EventSubscriber/ViewCartSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\GoogleAnalyticsBundle\Event\ClientSideEvent;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\ViewCartEvent;
use Setono\GoogleAnalyticsEvents\Event\ViewCartEvent;
use Setono\SyliusAnalyticsPlugin\Resolver\Items\ItemsResolverInterface;
use Setono\SyliusAnalyticsPlugin\Util\FormatAmountTrait;
use Sylius\Component\Core\Model\OrderInterface;
Expand Down Expand Up @@ -70,7 +70,7 @@ public function track(RequestEvent $requestEvent): void
),
);
} catch (\Throwable $e) {
$this->log(ViewCartEvent::NAME, $e);
$this->log(ViewCartEvent::getName(), $e);
}
}
}
4 changes: 2 additions & 2 deletions src/EventSubscriber/ViewItemListSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\GoogleAnalyticsBundle\Event\ClientSideEvent;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\ViewItemListEvent;
use Setono\GoogleAnalyticsEvents\Event\ViewItemListEvent;
use Setono\SyliusAnalyticsPlugin\Event\ItemListViewed;
use Setono\SyliusAnalyticsPlugin\Resolver\Item\ItemResolverInterface;
use Setono\SyliusAnalyticsPlugin\Util\FormatAmountTrait;
Expand Down Expand Up @@ -104,7 +104,7 @@ public function trackNative(ResourceControllerEvent $resourceControllerEvent): v

$this->eventDispatcher->dispatch(new ClientSideEvent($event));
} catch (\Throwable $e) {
$this->log(ViewItemListEvent::NAME, $e);
$this->log(ViewItemListEvent::getName(), $e);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/EventSubscriber/ViewItemSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\GoogleAnalyticsBundle\Event\ClientSideEvent;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\ViewItemEvent;
use Setono\GoogleAnalyticsEvents\Event\ViewItemEvent;
use Setono\SyliusAnalyticsPlugin\Resolver\Item\ItemResolverInterface;
use Setono\SyliusAnalyticsPlugin\Util\FormatAmountTrait;
use Sylius\Bundle\ResourceBundle\Event\ResourceControllerEvent;
Expand Down Expand Up @@ -54,7 +54,7 @@ public function track(ResourceControllerEvent $resourceControllerEvent): void
),
);
} catch (\Throwable $e) {
$this->log(ViewItemEvent::NAME, $e);
$this->log(ViewItemEvent::getName(), $e);
}
}
}
2 changes: 1 addition & 1 deletion src/Message/Command/SendPurchaseEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Setono\SyliusAnalyticsPlugin\Message\Command;

use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\PurchaseEvent;
use Setono\GoogleAnalyticsEvents\Event\PurchaseEvent;

final class SendPurchaseEvent implements CommandInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Resolver/Item/ItemResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Setono\SyliusAnalyticsPlugin\Resolver\Item;

use Psr\EventDispatcher\EventDispatcherInterface;
use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\Item\Item;
use Setono\GoogleAnalyticsEvents\Event\Item\Item;
use Setono\SyliusAnalyticsPlugin\Event\ItemResolved;
use Setono\SyliusAnalyticsPlugin\Resolver\Brand\BrandResolverInterface;
use Setono\SyliusAnalyticsPlugin\Resolver\Category\CategoryResolverInterface;
Expand Down
2 changes: 1 addition & 1 deletion src/Resolver/Item/ItemResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Setono\SyliusAnalyticsPlugin\Resolver\Item;

use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\Item\Item;
use Setono\GoogleAnalyticsEvents\Event\Item\Item;
use Sylius\Component\Core\Model\OrderItemInterface;
use Sylius\Component\Core\Model\ProductInterface;

Expand Down
2 changes: 1 addition & 1 deletion src/Resolver/Items/ItemsResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Setono\SyliusAnalyticsPlugin\Resolver\Items;

use Setono\GoogleAnalyticsMeasurementProtocol\Request\Body\Event\Item\Item;
use Setono\GoogleAnalyticsEvents\Event\Item\Item;
use Sylius\Component\Core\Model\OrderInterface;

interface ItemsResolverInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
{{ sylius_template_event('sylius.shop.layout.before_body') }}
<div class="pusher" data-route="{{ app.request.get('_route') }}">
{% block top %}
<div id="menu" class="top-menu">
<a href="#" class="top-menu__link">{{ 'sylius.top_bar'|trans }}</a>
<div class="top-bar">{{ sylius_template_event('sylius.shop.layout.topbar') }}</div>
<div id="menu" class="ui large sticky inverted stackable menu">
{{ sylius_template_event('sylius.shop.layout.topbar') }}
</div>
{% endblock %}

Expand Down