This has a random number plus a timestamp

mp_cid(seed = NULL)

Arguments

seed

If you set a seed, then the random number will be the same for each value

Value

A string suitable as an Id with a random number plus a timestamp delimited by a period.

See also

Other Measurement Protocol functions: mp_event_item(), mp_event(), mp_send()

Examples


# random Id
mp_cid()
#> [1] "21671376.1644310323"

# fix the random number (but not the timestamp)
mp_cid(1)
#> [1] "26550867.1644310323"