Gosquared

Learn how to use Gosquared with Composio

Overview

SLUG: GOSQUARED

Description

GoSquared provides real-time web analytics and customer engagement tools to help businesses understand and interact with their website visitors.

Authentication Details

generic_api_key
stringRequired
generic_token
stringRequired

Connecting to Gosquared

Create an auth config

Use the dashboard to create an auth config for the Gosquared toolkit. This allows you to connect multiple Gosquared accounts to Composio for agents to use.

1

Select App

Navigate to Gosquared.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Gosquared Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4gosquared_auth_config_id = "ac_YOUR_GOSQUARED_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": {"generic_api_key": user_api_key}}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Gosquared for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, gosquared_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Gosquared toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["GOSQUARED"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Add Shared User

Description

Tool to add a new shared user to a project. Use when inviting team members via their email address.

Action Parameters

email
stringRequired
notify
booleanDefaults to True
role
stringDefaults to member

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove shared user

Description

Tool to remove a user from a GoSquared project. Use when you need to revoke a shared user's access to your site.

Action Parameters

email
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Account Shared Users

Description

Tool to retrieve all team members that have access to a given project. Use after specifying the project to inspect user access.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Account Sites

Description

Tool to list all projects/sites accessible to the authenticated account. Use when you need to retrieve the account's sites in either grouped or flat format.

Action Parameters

callback
string
presenter
stringDefaults to grouped

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Check API Token Validity and Scopes

Description

Tool to check whether an API key is valid and retrieve its enabled scopes. Use when verifying API credentials before making further API calls.

Action Parameters

api_key
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve Chat Conversation

Description

Tool to retrieve a chat conversation by its ID. Use when you need the full conversation history after obtaining a chat session ID.

Action Parameters

chatID
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve Chat Messages

Description

Tool to retrieve a list of messages from a chat conversation. Use after identifying the chatID via listing chat conversations to page through a chat's message history.

Action Parameters

chatID
stringRequired
from_date
string
limit
stringDefaults to 0,10
to_date
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve Chat Conversations

Description

Tool to retrieve chat data for reporting purposes. Use when you need to list active chat conversations within a specific time window.

Action Parameters

from_date
string
limit
stringDefaults to 0,10
to_date
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve Chat Feed

Description

Tool to retrieve messages and events from a chat conversation. Use when you need to fetch chat history for a specific chat session.

Action Parameters

chat_id
stringRequired
from_date
string
limit
stringDefaults to 0,10
to_date
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete person

Description

Tool to delete a person profile and all associated data. Use when you need to permanently remove a person's record and optionally blacklist them.

Action Parameters

blacklist
boolean
person_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get specific chat message

Description

Tool to retrieve a specific chat message. Use when you have both chat ID and message ID to fetch the message details.

Action Parameters

chat_id
stringRequired
message_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Specific Visitor

Description

Tool to retrieve information for a specific online visitor. Use after obtaining visitorID to get detailed visit data.

Action Parameters

limit
string
presenter
string
visitorID
stringRequired
visitorsMode
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get People Event Types

Description

Tool to retrieve event types ordered by tracked count. Use when you need to display the most tracked event types.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get People Property Types

Description

Tool to retrieve all property types in People CRM. Use when you need to discover available profile or event properties.

Action Parameters

custom_only
boolean
property_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Person

Description

Tool to retrieve a specific person profile by ID. Use when you need to fetch details of a person by their unique identifier.

Action Parameters

person_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: GoSquared - Get Person Feed

Description

Tool to retrieve a specific person's event feed in reverse chronological order. Use after confirming the personID.

Action Parameters

from_time
string
limit
stringDefaults to 0,10
personID
stringRequired
query
string
sort
stringDefaults to ts:desc
to_time
string
type
stringDefaults to event,sessionEvent

Action Response

data
arrayRequired
error
string
successful
booleanRequired

Tool Name: List People

Description

Tool to search and filter People CRM profiles. Use when you need to retrieve a list of people based on query terms, specific property or event filters, sorting, and pagination.

Action Parameters

dateFormat
string
fields
string
filters
array
limit
string
presenter
string
query
string
sort
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get current concurrent visitors

Description

Tool to retrieve the number of concurrent visitors currently on your site. Use when you need live, real-time visitor metrics.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Real-Time Popular Pages

Description

Tool to retrieve the most popular pages currently being viewed on your site. Use when real-time active page data is needed.

Action Parameters

href
string
limit
stringDefaults to 0,10

Action Response

data
arrayRequired
error
string
successful
booleanRequired

Tool Name: Get Real-Time Visitor Platforms

Description

Tool to retrieve platforms used by online visitors sorted by visitor count. Use when you need a real-time breakdown of active visitor platforms.

Action Parameters

limit
stringDefaults to 0,5
presenter
stringDefaults to truncatedList

Action Response

data
arrayRequired
error
string
successful
booleanRequired

Tool Name: Get Real-Time Overview

Description

Tool to retrieve a summary of real-time data for the site. Use when a snapshot of current online visitor metrics and summary statistics is needed.

Action Parameters

dateFormat
string
from_date
string
to_date
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Now Sources

Description

Tool to retrieve the most influential traffic sources currently driving visitors to your site. Use when you need an up-to-the-minute breakdown of referrer sources.

Action Parameters

drillLimit
string
limit
string
minimal
boolean
sections
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Time Series

Description

Tool to retrieve visitor counts over time as data points. Use when you need historical visitor data bucketed by interval.

Action Parameters

dateFormat
string
from_time
string
interval
string
to_time
string

Action Response

data
arrayRequired
error
string
successful
booleanRequired

Tool Name: Get Real-Time Online Visitors

Description

Tool to retrieve a list of current online visitors. Use when you need detailed real-time visitor information.

Action Parameters

dateFormat
string
from_date
string
limit
string
to_date
string
visitorsMode
stringDefaults to all

Action Response

data
arrayRequired
error
string
successful
booleanRequired

Tool Name: GoSquared - People Devices

Description

Tool to retrieve device information from People CRM. Use when you need a paginated view of a user's device usage.

Action Parameters

limit
stringDefaults to 0,10

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Export Smart Group Feed

Description

Tool to export all pageview activity for a Smart Group to CSV. Use when you need a temporary download link for up to 60 days of data; link expires after 15 minutes.

Action Parameters

from_date
string
group_id
stringRequired
to_date
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Smart Group People

Description

Tool to retrieve people in a specific Smart Group. Use when listing or filtering members of a Smart Group.

Action Parameters

dateFormat
string
fields
string
group_id
stringRequired
limit
stringDefaults to 0,10
presenter
stringDefaults to plain
query
string
sort
stringDefaults to last.seen:desc

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List People SmartGroups

Description

Tool to retrieve all Smart Groups for a project. Use when you need to list the Smart Groups configured in your People project.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add Account Site

Description

Tool to add a new site to the GoSquared account. Use when you want to register a new site for data collection under your account.

Action Parameters

name
string
timezone
string
url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Archive Chat Conversation

Description

Tool to archive a chat conversation. Use when you need to programmatically close out a chat after its session ends.

Action Parameters

chatID
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Send Chat Message

Description

Tool to send a message in a chat conversation. Use after confirming chatID and providing auth if sending as client.

Action Parameters

auth
string
chatID
stringRequired
content
stringRequired
sender
string
timestamp
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Leave Chat Note

Description

Tool to leave a note in a chat conversation. Use when you need to annotate or add comments to an existing chat session.

Action Parameters

chatID
stringRequired
content
stringRequired
sender
string
timestamp
integer

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Unarchive Chat Conversation

Description

Tool to unarchive a chat conversation. Use when you need to restore an archived chat back to active state after confirming that the conversation should be resumed.

Action Parameters

chatID
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create People SmartGroup

Description

Tool to add a new Smart Group to a GoSquared project. Use when you need to segment users by custom criteria.

Action Parameters

filters
arrayRequired
name
stringRequired
prefs
object
sortDir
string
sortField
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Track GoSquared Event

Description

Tool to send custom events to GoSquared. Use when tracking user or system events in analytics.

Action Parameters

campaign
object
character_set
string
event
objectRequired
ip
string
language
string
last_pageview
string
location
object
page
object
person_id
string
referrer
string
returning
boolean
screen
object
total
object
user_agent
string
visitor_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Track GoSquared Identify

Description

Tool to identify users and associate them with specific properties in GoSquared. Use after obtaining or confirming a visitor’s identity to link their anonymous activity with their known user record and update their profile.

Action Parameters

person_id
stringRequired
properties
object
visitor_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Track Pageview

Description

Tool to track pageviews. Use when you need to record a pageview event for a visitor after obtaining their visitor_id and page details.

Action Parameters

campaign
object
character_set
string
ip
string
language
string
last_pageview
string
location
object
page
objectRequired
referrer
string
returning
boolean
screen
object
timestamp
string
total
object
user_agent
string
visitor_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Track GoSquared Transaction

Description

Tool to track e-commerce transactions. Use when a user completes a purchase and you need to record the transaction in GoSquared.

Action Parameters

campaign
object
character_set
string
ip
string
language
string
last_pageview
string
location
object
page
object
person_id
string
returning
boolean
screen
object
timestamp
string
total
object
transaction
objectRequired
user_agent
string
visitor_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired