You can access the integrations settings by clicking the Integrations button under the Companion Forums Site module in your Tightknit app home.

Within the Integrations modal you can configure Google Tag Manager, a free tool that allows you to manage and deploy marketing tags (snippets of code or tracking pixels) on your website without having to modify the code.

Google Tag Manager

You can connect your Google Tag Manager to the Tightknit companion site. All you need is your GTM ID. Below is a detailed guide on how to connect Tightknit to Google Tag Manager and Google Analytics, including how you can track custom Tightknit events.

Connect Google Tag Manager

1

Create a Google Tag Manager account and container

Visit Google Tag Manager.

  1. If you don’t have one already, create an account for your company and a container for the Tightknit companion site.
  2. In the Workspace view, locate your Google Tag Manager ID (GTM-XXXXXX) in the navigation header
  3. Open the Tightknit app in Slack and open the Integrations settings under the Companion Forums Site module
  4. Enter your GTM ID and click Update.

2

[Optional] Connect Google Analytics

Visit Google Analytics.

  1. Create a “Property” for the Tighktnit site:
    1. Click the ⚙ Admin Button in the bottom left corner
    2. Click the +Create button and select Property
    3. Copy the Measurement ID (G-XXXXXXXXXX)

Now, we’ll return back to Google Tag Manager to add the Google Analytics Property to our container. This will forward all activity on all page views to GA.

  1. Create a new GTM Tag:
    1. In the Workspace view, navigate to Tags on the left hand navigation
    2. Click the New button
    3. Click the Tag Configuration section and select Google Analytics > Google Tag
    4. Paste the Measurement ID from above (G-XXXXXXXXXX) into the Tag ID field
    5. Click the Triggering section, select Trigger Configuration, and then ‘Initialization - All Pages’
    6. Click Save
  2. Submit the GTM changes and publish
3

[Optional] Track Tightknit Events

In order to track the custom events from Tightknit, you must configure tags and variables.

  1. Open your Google Tag Manager container workspace.

  2. Create a Trigger for the event

    1. Navigate to Triggers in the sidebar and click the New button
    2. Select the Trigger Configuration section
    3. elect “Custom Event” for the trigger type
    4. Give an Event name such as “Tightknit CTA button click”
    5. Fire the trigger on “Some Custom Events”
    6. Reference the Tightknit Event in the table below. Set the trigger condition to equal the Event. For example: Event equals tk-cta-button-click
    7. Click Save
  3. Create a Variable to capture the event’s variables

    1. Navigate to Variables in the sidebar and click the New button under the User-Defined Variables section
    2. Select the Variable Configuration section
    3. For the Variable Type, select “Data Layer Variable”
    4. For the Data Layer Variable Name, enter the name exactly as the variable appears in the Events table data layer variables. For example, use location for the location variable.
    5. Leave the remaining fields with their default values
    6. Click Save
    You can reuse the same Variable object across multiple events if the Data Layer variable name is exactly the same. For example, location is the same across several events.
  4. Create a Tag for the event

    1. Navigate to Tags in the sidebar and click the New button
    2. Select the Tag Configuration section
    3. For Tag Type, select “Google Analytics: GA4 Event”
    4. For Tag ID, enter the GA measurement ID from the earlier step (G-XXXXXXXXXX)
    5. Under Event Parameters, add a new parameter. For the Event Parameter, use the name of the data layer variable, e.g. location. For the Value, click the lego variable button and select the Variable created from the previous step.
    6. Select the Triggering section
    7. Under Firing Triggers, add a new item and select the name of the Custom Event trigger you created in the first step
    8. Click Save
  5. Submit the GTM changes and publish

From this point onwards, the events and variables will be pushed to Google Analytics. However, you must still configure a custom dimension for the variables to appear in reporting.

  1. Open your Google Analytics container workspace.
  2. Create a new Custom Definition
    1. Click the ⚙ Admin Button in the bottom left corner
    2. Navigate to Property Settings > Data display > Custom definitions, in the sidebar
    3. Click Create custom dimension
    4. Enter a descriptive name for the Dimension name. Select “Event” for the Scope. Enter the exact data layer variable name for the Event Parameter, e.g. location.
    5. Click Save
  3. To verify your setup:
    1. Trigger a real event on your Tightknit site, e.g. click the Call to Action button.
    2. Go to Reports > Engagement > Events.
    3. Ensure the time window (top-right) is appropriate, e.g. last 24 hours.
    4. You should see some recent events, including the Tightknit events. If you click on the event item, you should see an event-specific dashboard and the ability to filter by the data layer variables we configured earlier!

Events

The following custom events are pushed to GTM via the data layer when certain activity occurs on your Tightknit companion site.

EventDescriptionData Layer variables
tk-cta-button-clickCall to Action button is clickedtext: the text of the button element
location: the location of the button on the site
tk-slack-permalink-clickSlack permalink, which links to the original item in Slack, is clickedpermalink: the Slack URL permalink
location: the location of the link on the site