Skip to content

Add custom analytics code for generated Cloudinary URLs #63

@colbyfayock

Description

@colbyfayock

To give the ability to track Gatsby usage in addition to or separate from the standard JS usage, we'd like to add a custom Analytics ID

The Analytics token is appended at the end of Cloudinary URLs as a query parameter by the SDKs, giving us the ability to have insights as to what SDKs or tools are making Cloudinary requests.

The relevant code depends on the SDK being used, but the Cloudinary URL Gen SDK would be added similar to this work from Next Cloudinary:

https://github.com/colbyfayock/next-cloudinary/blob/ab7ba447af6eff264d9baf984ca513b5910a316e/next-cloudinary/src/lib/cloudinary.ts#L101

To implement, set the real versions including:

  • sdkCode: X (this is the Gatsby specific code)
  • sdkVersion: the current version of this Gatsby plugin (ideally dynamically added)
  • techVersion: the current Gatsby version being used (ideally dynamically added)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions