Skip to content

The moment it happens

Tag contacts when your site reports an action

Your site sends an email and a tag, and the matching contact is tagged in ActiveCampaign.

Runs
The moment it happens
Apps
ActiveCampaign
AI
Not needed
Access
API key

Send this to your assistant

Create a ClickRuntime automation: give me a link my site can post to. When it sends an email and a tag like trial-started, add that tag to the ActiveCampaign contact, creating the contact if needed.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

Your website knows things that ActiveCampaign does not: that a visitor watched the pricing video, started a trial, or downloaded the implementation guide. Unless that behavior becomes a tag on the contact, your automations cannot react to it, and the person gets the same generic emails as everyone else. Marketers end up exporting CSVs from the site and importing them into ActiveCampaign by hand, days late.

Your site or app sends a small webhook containing an email address and a tag name. The automation syncs the contact, creating it if it does not exist yet, and adds the tag. Any ActiveCampaign automation that starts when a tag is added can then take over.

It suits product-led teams, course creators and shops with custom checkouts that want behavior on their own site to drive email.

What you get out of it

  • Emails match what the person just did

    A contact who finished onboarding gets the next lesson, not a welcome series again. Relevant messages get opened, and unsubscribes go down. A person who just completed a lesson or trial step is waiting for the next message, not a repeat of the first one.

  • No manual CSV imports

    Behavior from your site reaches ActiveCampaign in seconds, so nobody spends time exporting and importing lists, and no segment is a week out of date. The saved hours also remove the risk of importing the wrong file or an old export over newer data.

  • Tags work with any site or tool

    Anything that can send a webhook can tag a contact: a custom app, a form builder, a payment page. You are not limited to ActiveCampaign's own site tracking. If your product can post a small JSON message, ActiveCampaign can react to it.

  • Missing contacts are created

    Because the contact is synced first, the tag is never lost when the person is not yet in the account. First-time visitors enter the right automation straight away. That also avoids duplicate contacts, since existing people are matched by email address.

  • Sales sees intent signals

    Tags such as demo-viewed or pricing-visited can trigger a task for a rep. Outreach starts when interest is highest. A rep can call someone who has just viewed pricing for the third time, a signal that would otherwise go unseen in your site analytics.

How it works

What happens, step by step

  1. When your website reports an action, such as a trial starting, it sends the person's email and a tag name to your ClickRuntime link.

  2. The automation finds that contact in ActiveCampaign by email, or creates them if they are new.

  3. It finds the tag, creating it if it doesn't exist yet, and adds it to the contact, ready for your automations and segments.

Before it runs live

  • Connect ActiveCampaign
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Tag contacts when your site reports an actionjust nowSucceeded
ActiveCampaign · Contactdana@acme.example tagged trial-started

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other ActiveCampaign steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
tag_contacts_from_a_webhook.pyexample
from clickruntime import on_event, credentials, http

BASE = "https://acme.api-us1.com/api/3"

@on_event
def handle(event):
    body = event.json
    h = {"Api-Token": credentials.secret("ACTIVECAMPAIGN_API_KEY")}
    contact = http.post(f"{BASE}/contact/sync", json={"contact": {"email": body["email"]}}, headers=h).json()["contact"]
    tags = http.get(f"{BASE}/tags", params={"search": body["tag"]}, headers=h).json()["tags"]
    tag = next((t for t in tags if t["tag"] == body["tag"]), None)
    if not tag:
        tag = http.post(f"{BASE}/tags", json={"tag": {"tag": body["tag"], "tagType": "contact"}}, headers=h).json()["tag"]
    http.post(f"{BASE}/contactTags", json={"contactTag": {"contact": contact["id"], "tag": tag["id"]}},
              headers=h).raise_for_status()
    return {"contact": contact["id"], "tag": body["tag"]}

FAQ

Common questions

What must the webhook payload contain?
At minimum an email address and the name of the tag. Optional fields such as first name or a list ID can be sent too and will be used when the contact is created in ActiveCampaign. Keep the tag name consistent in your code, since ActiveCampaign treats different spellings as different tags.
What if the tag does not exist yet?
The step can create it first, so a new tag name sent from your site works the first time. If you prefer strict control, it can instead reject unknown tag names and tell you which one was refused.
Can I remove a tag the same way?
Yes. A second webhook with an action field can remove a tag, for example to take someone out of a trial sequence once they purchase. Your AI assistant can add that path alongside the first.
What permissions does it need?
API key. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Tag contacts when your site reports an action” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.