Conversion Shortcode
When to Use the Conversion Shortcode
The conversion shortcode gives you precise control over when and how conversions are counted. Place it inside a trigger version to fire a conversion only when a specific condition is met, or use it to track clicks and other actions that don’t result in a page visit.
The Shortcode
[ifso_conversion conversion='ID']
Replace ID with the conversion ID from the Conversions table in If-So → Analytics.
Shortcode Attributes
| Attribute | Description | Example |
|---|---|---|
| conversion | The ID of the conversion to fire | conversion='5' |
| triggers | Comma-separated trigger IDs to include in attribution. | triggers='101,204' |
| exclude | Comma-separated trigger IDs to exclude from attribution | exclude='101' |
| do_once_per | Minimum time between conversions for the same visitor, in seconds | do_once_per='86400' |
Use Cases
Conditional Conversions
Place the conversion shortcode inside an If-So trigger version. The conversion fires only when that specific version is shown to the visitor — not on every page visit.
- Create a conversion goal in If-So → Analytics and note its ID.
- Create a new If-So Trigger.
- Set the condition for the version you want to track (e.g. UTM source = google).
- Paste the conversion shortcode as the version’s content:
- Place the trigger on the relevant page.
When the condition is met and the version is shown, the conversion is fired.
Tracking Clicks as Conversions
If-So’s URL-based conversion tracking counts page visits. To track a button or link click instead, use a query string workaround with the Dynamic Link condition.
Step 1: Add a query string to the button link
Modify each button’s URL to include a unique query string:
https://yoursite.com/page?ifso=btn1
https://yoursite.com/page?ifso=btn2
Both buttons point to the same page but with different query strings — this lets If-So identify which button was clicked.
Step 2: Create a trigger with a Dynamic Link condition
Create a new If-So Trigger with one version per button:
- Version A — Condition: Dynamic Link → is →
?ifso=btn1→ Content:
[ifso_conversion conversion='ID']
- Version B — Condition: Dynamic Link → is →
?ifso=btn2→ Content:
[ifso_conversion conversion='ID']
Step 3: Place the trigger on the destination page
Paste the trigger shortcode on the page the buttons point to.
When a visitor clicks Button 1, they land on the page with ?ifso=btn1 in the URL. The trigger detects the query string, shows Version A, and fires the conversion.