import * as GQL from '../backend/graphqlschema'; declare class EventLogger { private hasStrippedQueryParameters; private user?; private anonUid?; constructor(); /** * Set user-level properties in all external tracking services */ updateUser(user: GQL.IUser): void; /** * Set user ID in Telligent tracker script. * @param uniqueSourcegraphId Unique Sourcegraph user ID (corresponds to User.ID from backend) * @param username Human-readable user identifier, not guaranteed to always stay the same */ setUserIds(uniqueSourcegraphId: number | null, username: string | null): void; setUserEmail(primaryEmail: string): void; /** * Log a pageview. * Page titles should be specific and human-readable in pascal case, e.g. "SearchResults" or "Blob" or "NewOrg" */ logViewEvent(pageTitle: string, eventProperties?: any, logUserEvent?: boolean): void; /** * Log a user action or event. * Event labels should be specific and follow a ${noun}${verb} structure in pascal case, e.g. "ButtonClicked" or "SignInInitiated" */ log(eventLabel: string, eventProperties?: any): void; private logToConsole; private decorateEventProperties; /** * Access the Telligent unique user ID stored in a cookie on the user's computer. Cookie TTL is 2 years * https://sourcegraph.com/github.com/telligent-data/telligent-javascript-tracker@890d6a69b84fc0518a3e848f5469b34817da69fd/-/blob/src/js/tracker.js#L178 * * Only used on Sourcegraph.com, not on self-hosted Sourcegraph instances. */ private getTelligentDuid; /** * Generate a new anonymous user ID if one has not yet been set and stored. */ private generateAnonUserID; /** * Get the anonymous identifier for this user (used to allow site admins * on a Sourcegraph instance to see a count of unique users on a daily, * weekly, and monthly basis). */ getAnonUserID(): string; } export declare const eventLogger: EventLogger; export {}; //# sourceMappingURL=eventLogger.d.ts.map