setAPIKey

Sets your API key. Required to track events.

FieldTypeRequiredDescription
apiKeystringYes

Your Brytelytics API key for this website or app

This is done during the initialization process.

This is done during the initialization process.

This function is not necessary for server-side code. It's specifically a feature of the Brytecore official libraries.

1/* setAPIKey syntax */
2
3brytescore( "setAPIKey", apiKey );

Updated July 25, 2026