Coder Social home page Coder Social logo

Event tracking names must be between 1 and 40 characters, and must be contain only alphanumerics, _, - or spaces, starting with alphanumeric or _. about analytics-ios-integration-facebook-app-events HOT 9 CLOSED

segment-integrations avatar segment-integrations commented on July 20, 2024
Event tracking names must be between 1 and 40 characters, and must be contain only alphanumerics, _, - or spaces, starting with alphanumeric or _.

from analytics-ios-integration-facebook-app-events.

Comments (9)

f2prateek avatar f2prateek commented on July 20, 2024

We should definitely be cleaning up some of the limitations in the integration.

Iā€™m thinking we should replace the offending characters, automatically upercase the event and truncate event names to 40 characters. Does that seem reasonable?

from analytics-ios-integration-facebook-app-events.

akramhussein avatar akramhussein commented on July 20, 2024

Truncating to 40 seems fine (I'm sure there are cases where it is less the ideal but I guess notes in documentation as well would support this decision and then users could understand why it's done).
Replacing or removing all offending characters makes sense but not sure how aggressive it should be.
Not sure why uppercasing all?

We use the naming convention of PLATFORM.PAGE.EVENT e.g. app.search.successful or site.home.button-pressed. So the period is useful to us and removing it would break the naming.

I did some testing in FB:
FB Analytics

Submitted a PR for just truncating as that is less controversial I imagine :)

from analytics-ios-integration-facebook-app-events.

f2prateek avatar f2prateek commented on July 20, 2024

Ah sorry I read that incorrectly, yeah definitely no need to uppercase.

from analytics-ios-integration-facebook-app-events.

hankim813 avatar hankim813 commented on July 20, 2024

fixed in #5

from analytics-ios-integration-facebook-app-events.

f2prateek avatar f2prateek commented on July 20, 2024

We still need to add a check for "and must be contain only alphanumerics, _, - or spaces, starting with alphanumeric or _". I haven't heard of this causing an issue for anyone so will leave the issue closed, but if you do, please comment and we'll reopen.

from analytics-ios-integration-facebook-app-events.

akramhussein avatar akramhussein commented on July 20, 2024

In the end I hard-coded the following line line to replace the '.' in my event names:

truncatedEvent = [truncatedEvent stringByReplacingOccurrencesOfString:@"." withString:@"-"];

I didn't make a PR for this because its specific to our usage. I think the best approach would be to replace all offending characters with a default e.g. _ but also allow users to replace it themselves by passing in a param? However, I'm not sure this is possible?

from analytics-ios-integration-facebook-app-events.

f2prateek avatar f2prateek commented on July 20, 2024

Yeah we could, but I don't want to make it an option (at least for now) - replacing . with - sounds like a sensible default.

from analytics-ios-integration-facebook-app-events.

akramhussein avatar akramhussein commented on July 20, 2024

@f2prateek I've created a PR #6 which replaces all offending characters with -. May want to take a look as I'm a little rusty with Objective-C and can't recall best practices.

from analytics-ios-integration-facebook-app-events.

toddgower-hiatus avatar toddgower-hiatus commented on July 20, 2024

Can we reopen this feature request? We use periods in our event naming scheme as well and I would like to avoid making changes to the segment library.

from analytics-ios-integration-facebook-app-events.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.