--- title: "Electron Desktop Application" slug: "electron-desktop-application" updated: 2026-11-23T12:30:19Z published: 2026-11-23T12:30:19Z canonical: "support.gainsight.com/electron-desktop-application" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.gainsight.com/llms.txt > Use this file to discover all available pages before exploring further. # Electron Desktop Application This article explains how to integrate Electron Desktop with Gainsight PX. ## Overview Gainsight PX supports Electron tracking and personalization by injecting the tracking SDK and calling the standard identify function. ## Installing ```plaintext npm install @exponent/electron-cookies --save ``` ## Installing Gainsight PX SDK Copy the Gainsight PX Tag and modify the following: 1. Domain origin (example2.com) to your top level domain 2. PX tag key (AP-XXXXXXXXXXXXX-2) to your actual key ```plaintext //  Gainsight PX Tag ``` ## Tracking User & Account ```plaintext aptrinsic("identify",              {                //User Fields                "id": "AABI1gSVNv44pGSGuivAdpDw7tsOZntsHkDAbg", // Required for logged in app users                "email": "qa@gainsight.com",                "firstName": "John",                "lastName": "Smith",              },              {                //Account Fields                "id":"12319876534234234", //Required                "name":"IBM Inc", }); ``` ## Using Custom Events ```plaintext aptrinsic('track', 'Search', {"terms":"User search action","results" :5000 , "Search date":"2018-03-08T18:11:00Z" }); ``` ## Running Electron Hello World Example (assuming you have npm installed) ```plaintext # Clone the Quick Start repository $ git clone https://github.com/electron/electron-quick-start # Go into the repository $ cd electron-quick-start # Install electron-cookies $ npm install @exponent/electron-cookies --save ``` Update the index.html before the closing tag. Also, enter the product key from your PX instance: "AP-XXXXXXXXXXXX-2" ```plaintext ``` ### Running the example ```plaintext # Install the dependencies and run $ npm install && npm start ``` ### Validate tracking works ![user_profile_audience_explorer.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/user_profile_audience_explorer.jpeg?sv=2026-02-06&spr=https&st=2026-11-24T18%3A01%3A51Z&se=2026-11-24T19%3A01%3A51Z&sr=b&sp=r&sig=voH4zdyF2Vu%2BKDnbFr9ms2kINmiIp5OP7tewQ%2F8FSjM%3D) ### Trigger Survey ![image-1.png](https://cdn.us.document360.io/8e136619-829c-49c5-afb1-72de86f13288/Images/Documentation/image_02(1).png?sv=2026-02-06&spr=https&st=2026-11-24T18%3A01%3A51Z&se=2026-11-24T19%3A01%3A51Z&sr=b&sp=r&sig=YLHRu%2BKDSizp2zelFSZg4THzbR59FQgjj1looVycKyU%3D)