@gravity-ui/page-constructor 2.20.1 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.21.0](https://github.com/gravity-ui/page-constructor/compare/v2.20.1...v2.21.0) (2023-05-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * remove metrika goals from pixel events ([#355](https://github.com/gravity-ui/page-constructor/issues/355)) ([1a0ddae](https://github.com/gravity-ui/page-constructor/commit/1a0ddae92e4862665c64652c0da27cee9085d286))
9
+
3
10
  ## [2.20.1](https://github.com/gravity-ui/page-constructor/compare/v2.20.0...v2.20.1) (2023-05-29)
4
11
 
5
12
 
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useMetrika = void 0;
4
4
  const react_1 = require("react");
5
5
  const metrikaContext_1 = require("../context/metrikaContext");
6
- const models_1 = require("../models");
7
6
  const guards_1 = require("../models/guards");
8
7
  // eslint-disable-next-line valid-jsdoc
9
8
  /**
@@ -29,12 +28,6 @@ const useMetrika = () => {
29
28
  else {
30
29
  metrika.reachGoals(metrikaGoals);
31
30
  }
32
- if (!pixelEvents && pixel) {
33
- pixel.trackStandard(models_1.PixelEventType.SubmitApplication, {
34
- content_category: 'custom',
35
- content_ids: Array.isArray(metrikaGoals) ? metrikaGoals : [metrikaGoals],
36
- });
37
- }
38
31
  }
39
32
  if (pixel && pixelEvents) {
40
33
  if (isButtonPixel(pixelEvents)) {
@@ -1,6 +1,5 @@
1
1
  import { useContext } from 'react';
2
2
  import { MetrikaContext } from '../context/metrikaContext';
3
- import { PixelEventType } from '../models';
4
3
  import { isNewMetrikaFormat } from '../models/guards';
5
4
  // eslint-disable-next-line valid-jsdoc
6
5
  /**
@@ -26,12 +25,6 @@ export const useMetrika = () => {
26
25
  else {
27
26
  metrika.reachGoals(metrikaGoals);
28
27
  }
29
- if (!pixelEvents && pixel) {
30
- pixel.trackStandard(PixelEventType.SubmitApplication, {
31
- content_category: 'custom',
32
- content_ids: Array.isArray(metrikaGoals) ? metrikaGoals : [metrikaGoals],
33
- });
34
- }
35
28
  }
36
29
  if (pixel && pixelEvents) {
37
30
  if (isButtonPixel(pixelEvents)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "2.20.1",
3
+ "version": "2.21.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {