Cloudflare Logpush

Cloudflare Logpush streams every request's User-Agent to AttractOS for server-side bot detection. This catches AI bots that block JavaScript, providing complete visibility into which crawlers access your content. Setup takes under 5 minutes using our 1-click OAuth flow.

Why Use Cloudflare Logpush?

Client-Side Script

  • Only detects bots that run JavaScript
  • Detects LLM referrals
  • Tracks conversions
  • Works on any website

Prerequisites

  • Cloudflare Pro plan or higher — Logpush is not available on Free
  • Domain on Cloudflare — DNS must be proxied (orange cloud)
  • AttractOS account — Any plan works

Setup via Dashboard (Recommended)

Use our 1-click OAuth integration:

  1. 1

    Go to Integrations

    In your AttractOS dashboard, click Integrations in the sidebar.

  2. 2

    Connect Cloudflare

    Click Connect Cloudflare. You'll be redirected to Cloudflare to authorize.

  3. 3

    Authorize Access

    Grant AttractOS permission to create a Logpush job. We only request the minimum permissions needed.

  4. 4

    Select Zone

    Choose which Cloudflare zone (domain) to connect. It should match your AttractOS site.

  5. 5

    Done!

    Logpush starts immediately. Bot data will appear in your dashboard within minutes.

Manual Setup (Advanced)

If you prefer to configure Logpush manually via Cloudflare's dashboard or API:

Logpush Configuration

Destination https://attractos.com/api/integrations/cloudflare/logpush
Dataset HTTP Requests
Fields ClientRequestURI,ClientRequestUserAgent,ClientCountry,EdgeStartTimestamp
Header X-AttractOS-Site-Key: YOUR_SITE_KEY
Manual Setup via Cloudflare API
# Create Logpush job
curl -X POST "https://api.cloudflare.com/client/v4/zones/ZONE_ID/logpush/jobs" \
  -H "Authorization: Bearer CF_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "AttractOS Bot Tracking",
    "logpull_options": "fields=ClientRequestURI,ClientRequestUserAgent,ClientCountry,EdgeStartTimestamp",
    "destination_conf": "https://attractos.com/api/integrations/cloudflare/logpush?header_X-AttractOS-Site-Key=YOUR_SITE_KEY",
    "dataset": "http_requests",
    "enabled": true
  }'
// This is typically done once via Cloudflare dashboard
// or using Terraform/Pulumi for infrastructure-as-code

// Example Terraform configuration:
/*
resource "cloudflare_logpush_job" "attractos" {
  zone_id          = "your-zone-id"
  name             = "AttractOS Bot Tracking"
  enabled          = true
  dataset          = "http_requests"
  logpull_options  = "fields=ClientRequestURI,ClientRequestUserAgent,ClientCountry,EdgeStartTimestamp"
  destination_conf = "https://attractos.com/api/integrations/cloudflare/logpush?header_X-AttractOS-Site-Key=${var.attractos_site_key}"
}
*/
# Using cloudflare-python library
import CloudFlare

cf = CloudFlare.CloudFlare(token='CF_API_TOKEN')

logpush_job = {
    'name': 'AttractOS Bot Tracking',
    'logpull_options': 'fields=ClientRequestURI,ClientRequestUserAgent,ClientCountry,EdgeStartTimestamp',
    'destination_conf': f'https://attractos.com/api/integrations/cloudflare/logpush?header_X-AttractOS-Site-Key={site_key}',
    'dataset': 'http_requests',
    'enabled': True,
}

result = cf.zones.logpush.jobs.post(zone_id, data=logpush_job)
print(f"Logpush job created: {result['id']}")

Verify Integration

After setup, verify data is flowing:

  1. Go to your AttractOS dashboard
  2. Check Integrations — Cloudflare should show "Connected"
  3. Wait 5-10 minutes for initial data
  4. Check the Bot Visits metric — should start populating
Tip: Logpush has a ~5 minute delay. If you don't see data after 15 minutes, check the Cloudflare Logpush dashboard for any errors.

Troubleshooting

No data appearing

  • Verify the zone is proxied (orange cloud in Cloudflare DNS)
  • Check Cloudflare Logpush status — it should show "Active"
  • Ensure the site key in the header matches your AttractOS site
  • Wait 15 minutes — there's inherent delay in log delivery

Missing some bot visits

  • Cloudflare only logs requests that reach their edge. Cached responses may not be logged.
  • If you have page rules bypassing Cloudflare, those requests won't be logged.

Disconnecting

To stop sending data, either disable the Logpush job in Cloudflare or click "Disconnect" in AttractOS Integrations. Your existing data is preserved.

Frequently Asked Questions

Do I need a Cloudflare paid plan for Logpush?
Yes. Cloudflare Logpush requires a Pro plan or higher. The AttractOS integration itself works on all AttractOS plans.
What data does Cloudflare send to AttractOS?
We only receive the fields needed for bot detection: Request URI, User-Agent, Country, and Timestamp. No visitor IPs, cookies, or request bodies are transmitted.
Will this impact my Cloudflare performance?
No. Logpush runs asynchronously and doesn't add latency to requests. It's Cloudflare's official logging infrastructure used by enterprise customers.
Can I use both the client script and Cloudflare Logpush?
Yes, and we recommend it. The script handles LLM referrals and conversions (client-side), while Logpush handles comprehensive bot detection (server-side). They complement each other.
Bot Traffic by AttractOS