Identifying customer load tests or internal events

There are many cases where you must test traffic that might affect analytics or datasets or do not want to track events from users.

You can identify such events in the following ways:

  • Register specific IP addresses with Sitecore Discover so that these addresses are tagged as internal or load test events. Contact support if this is the case.

  • Including rfk_flags when you send event traffic.

Note

You must ensure that these flags are only sent upon identification of internal or load test traffic. Accidentally flagging real events results in data loss.

Flag specification

You can use different mechanisms to send flags. When you use multiple methods to send flags, there is precedence based on the mechanism.

The following table lists mechanisms for sending flags in the order they apply.

Priority

Mechanism

Key

Description

Example

1

URL query parameter

rfk_flags

Specify rfk_flags as a query parameter when reporting the event

GET {EVENT_URL}?data={<event_object>}&rfk_flags=cust_loadtest

2

Event body

rfk_flags

Specify rfk_flags as part of the event

Example event object:

RequestResponse
{
  "type": "order",
  "name": "confirm",
  "rfk_flags": "cust_internal",
  "value": { ... }
} 

3

HTTP header

x-rfk-flags

Specify x-rfk-flags in the header

CURL example:

RequestResponse
curl '{EVENT URL}' \
  -X POST \
  -H 'x-rfk-flags: cust_internal' \
  -H 'content-type: application/json' 
  -H 'cache-control: no-cache'  \
  -H 'accept: application/json'  \
  -H 'authorization: {AUTH_KEY}' 
  -d
'{"data":{"type":"view","name":"pdp","value":{}}}'
--compressed

4

Cookie

__rfk_flags

Specify __rfk_flags in a cookie

CURL example:

RequestResponse
curl '{EVENT URL}'  \
  -X POST  \
  --cookie "__rfk_flags=cust_internal"  \
  -H 'content-type: application/json' 
  -H 'cache-control: no-cache'  \
  -H 'accept: application/json'  \
  -H 'authorization: {AUTH_KEY}' 
  -d
'{"data":{"type":"view","name":"pdp","value":{}}}'
--compressed

The following are supported customer flag values:

Flag

Flag value

Description

Customer internal

"cust_internal"

Tells Discover that the traffic is from internal users. Discover analytics ignores these events.

Note

These events still count towards your usage of the service.

Customer load test

"cust_loadtest"

Tells Discover that the traffic is from load testing. Discover analytics ignores these events.

Note

These events still count towards your usage of the service.

Do you have some feedback for us?

If you have suggestions for improving this article,