feat: Add GA integration, support for GA4 (#4626)
* GA integration settings * trackingId -> measurementId Hook up script * Public page GA tracking Correct layout of settings * Remove multiple codepaths for loading GA measurementID, add missing db index * Remove unneccessary changes, tsc * test
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import fetch from "fetch-with-proxy";
|
||||
import { Op } from "sequelize";
|
||||
import { IntegrationType } from "@shared/types";
|
||||
import { IntegrationService, IntegrationType } from "@shared/types";
|
||||
import env from "@server/env";
|
||||
import { Document, Integration, Collection, Team } from "@server/models";
|
||||
import { presentSlackAttachment } from "@server/presenters";
|
||||
@@ -36,8 +36,8 @@ export default class SlackProcessor extends BaseProcessor {
|
||||
const integration = (await Integration.findOne({
|
||||
where: {
|
||||
id: event.modelId,
|
||||
service: "slack",
|
||||
type: "post",
|
||||
service: IntegrationService.Slack,
|
||||
type: IntegrationType.Post,
|
||||
},
|
||||
include: [
|
||||
{
|
||||
@@ -98,8 +98,8 @@ export default class SlackProcessor extends BaseProcessor {
|
||||
where: {
|
||||
teamId: document.teamId,
|
||||
collectionId: document.collectionId,
|
||||
service: "slack",
|
||||
type: "post",
|
||||
service: IntegrationService.Slack,
|
||||
type: IntegrationType.Post,
|
||||
events: {
|
||||
[Op.contains]: [
|
||||
event.name === "revisions.create" ? "documents.update" : event.name,
|
||||
|
||||
Reference in New Issue
Block a user