Clicks statistics

Affiliate click analytics with local redirects and GA4 events

Content Egg can record click statistics for affiliate links in two ways: with local redirects and without redirects. You can analyze results on a dedicated dashboard and (optionally) send GA4 events.

1. Track Clicks With Redirect

Enable at: Content Egg → Settings → General → Track Clicks With Redirect (enabled by default).

Clicks are counted for modules that have Link Cloaking (local redirects) enabled in their module settings.

Notes:

  • Known bots are filtered by user-agent to reduce noise.

  • After enabling cloaking, the plugin indexes existing product links in the background. On large sites this may take a few minutes.

  • You can adjust Clicks Retention (days) in settings.

2. Track Clicks Without Redirect

Some programs (e.g. Amazon) don’t allow link cloaking. For those modules, enable:

Content Egg → Settings → General → Track Clicks Without Redirect (disabled by default).

  • Links remain direct.

  • A lightweight JS beacon sends click events for counting.

3. Statistics Dashboard

Go to Content Egg → Clicks Statistics to review:

  • Date range & module filters, plus comparisons with the previous period.

  • Top posts and top products by clicks to focus optimization efforts.

  • Zero-click posts/products to identify content that may need updates or pruning.

  • Share of clicks by module for the selected range.

Tip: Regularly review pages with zero clicks. Rewriting or removing “dead” pages can improve SEO and user engagement.

4. Tracking Clicks in Google Analytics (GA4)

You can integrate Content Egg’s click events with Google Analytics 4 (GA4) to gain deeper insights into how users interact with your affiliate links.

Requirements

Go to: Content Egg → Settings → General → GA4 Link Tracking. Set GA4 Link Tracking = Enabled.

Once enabled, Content Egg will automatically send cegg_affiliate_click events to GA4 whenever users click your affiliate links.

Here’s an example of how the event code looks in your link:

<a rel="nofollow"
   onclick="gtag('event', 'cegg_affiliate_click', {
     'cegg_product_title': 'Round Pottery Drape Form for Plates',
     'cegg_module': 'AE__etsy',
     'cegg_unique_id': '753aa4ae6c3808728f252d6dcd3339ff',
     'cegg_post_id': 1824
   });"
   target="_blank"
   href="https://example.com/recommend/round-pottery-drape-form-for-plates-b43676/"
>
  View Price at Etsy.com
</a>

When a user clicks the link, the event is sent to GA4 in real time.

Testing Events

To verify the setup:

  • Open GA4 → Realtime → Events.

  • Look for the event name cegg_affiliate_click.

Using Custom Parameters

Each cegg_affiliate_click event includes additional parameters that help you identify where clicks came from and which products performed best.

Parameter
Description

cegg_product_title

The affiliate product’s title

cegg_module

Module ID (e.g., AE__etsy, Amazon)

cegg_unique_id

Unique product ID

cegg_post_id

Post ID where the link appears

To use these parameters as dimensions in GA4 reports, you need to register them as Custom Definitions.

Steps:

  1. In GA4, go to Admin (⚙️ icon) → Data Display → Custom Definitions.

  2. Click Create Custom Dimension.

  3. Fill in:

    • Dimension Name: A descriptive name (e.g., Product Title)

    • Scope: Event

    • Event Parameter: The exact parameter name (e.g., cegg_product_title)

Creating a GA4 Exploration Report

You can build a custom report to analyze affiliate clicks:

  1. Go to Explore → Blank Exploration.

  2. Add Dimensions such as:

    • Event name

    • Your custom definitions (e.g., Product Title, Module)

  3. Add the Metric: Event count

  4. Under Rows, add the dimensions you want to display.

  5. Under Values, include the event count.

  6. Apply a Filter:

    • Choose Event name

    • Set condition to “Exactly matches”

    • Enter: cegg_affiliate_click

You’ll now see how many times each product was clicked.

To view which pages generate the most clicks, add the Page path dimension. You can also export your report to Google Sheets for easier visualization and comparison.

Last updated