"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ga4_properties_1 = require("../ga4-properties");
const ga4_functions_1 = require("../ga4-functions");
const action = {
    title: 'Generate Lead',
    description: 'Log this event when a lead has been generated to understand the efficacy of your re-engagement campaigns.',
    platform: 'web',
    defaultSubscription: 'type = "track"',
    fields: {
        user_id: ga4_properties_1.user_id,
        currency: ga4_properties_1.currency,
        value: ga4_properties_1.value,
        user_properties: ga4_properties_1.user_properties,
        params: ga4_properties_1.params
    },
    perform: (gtag, { payload }) => {
        ga4_functions_1.updateUser(payload.user_id, payload.user_properties, gtag);
        gtag('event', 'generate_lead', {
            currency: payload.currency,
            value: payload.value,
            ...payload.params
        });
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map