From 97cc0a0d73dcacfefcdff785c802762e2a0a60d6 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 24 Feb 2017 17:34:21 +0000 Subject: PLT-5071: Client side component of Telemetry. (#5516) --- webapp/actions/post_actions.jsx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'webapp/actions/post_actions.jsx') diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx index 81ef73fc5..ad05a69db 100644 --- a/webapp/actions/post_actions.jsx +++ b/webapp/actions/post_actions.jsx @@ -9,6 +9,7 @@ import UserStore from 'stores/user_store.jsx'; import {loadStatusesForChannel} from 'actions/status_actions.jsx'; import {loadNewDMIfNeeded} from 'actions/user_actions.jsx'; +import {trackEvent} from 'actions/diagnostics_actions.jsx'; import Client from 'client/web_client.jsx'; import * as AsyncClient from 'utils/async_client.jsx'; @@ -64,10 +65,12 @@ export function handleNewPost(post, msg) { } export function flagPost(postId) { + trackEvent('api', 'api_posts_flagged'); AsyncClient.savePreference(Preferences.CATEGORY_FLAGGED_POST, postId, 'true'); } export function unflagPost(postId, success) { + trackEvent('api', 'api_posts_unflagged'); const pref = { user_id: UserStore.getCurrentId(), category: Preferences.CATEGORY_FLAGGED_POST, -- cgit v1.2.3-1-g7c22