GoSquared ACTION
Track Event
Track an event in GoSquared. Events are a versatile way of tracking anything that is happening on your site or app. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's GoSquared account once, then configure and run Track Event from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "gosquared-track-event",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
gosquared: { authProvisionId: "apn_xxxxxxx" },
siteToken: "Site Token",
eventName: "Event Name",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "gosquared-track-event",
"configured_props": {
"gosquared": { "authProvisionId": "apn_xxxxxxx" },
"siteToken": "Site Token",
"eventName": "Event Name"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "gosquared",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "gosquared-track-event",
arguments: {
siteToken: "Site Token",
eventName: "Event Name",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
siteToken Site Token | string | The token for the project you are retrieving data for Required Dynamic |
eventName Event Name | string | The name of the event to track. Popular events are aggregated by name in the Trends dashboard. Required |
eventData Event Data | object | Properties associated with this event. Note: event body data is not currently searchable, but it can be viewed on a per profile basis in People CRM. Optional |
personId Person ID | string | The People person ID that this action is associated with. If the identifier used is an email it should be prefixed with email: like this: email:jon@example.com Optional |
visitorId Visitor ID | string | The anonymous visitor ID that this action is associated with. Optional |
pageUrl Page URL | string | The URL of the page where the event occurred Optional |
pageTitle Page Title | string | The title of the page where the event occurred Optional |
timestamp Timestamp | string | A valid ISO 8601 timestamp. If not provided, current time will be used. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- gosquared-track-event
- Version
- 0.0.1
- App
- GoSquared
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗