在 Firebase 动态链接分析 api 中将“durationDays”设置为“从头开始”

问题描述 投票:0回答:1

以下网址用于获取与 Firebase 动态链接相关的分析数据:
https://firebasedynamiclinks.googleapis.com/v1/SHORT_DYNAMIC_LINK/linkStats?durationDays=DURATION

(请注意,上面的url是需要身份验证/令牌的API。您无法在浏览器中打开它。另外,SHORT_DYNAMIC_LINK和DURATION只是占位符而不是实际参数值。
我添加链接的原因是因为我的问题是关于占位符的值 - 链接中存在的持续时间)

DURATION 表示需要获取多少天(向后)有价值的数据。

我的要求是从一开始就获取数据(当创建动态链接时)。那么,我应该为

durationDays
设置什么值才能实现这一目标?

作为解决方法,我可以设置一个很大的数字(例如 1000 天),但想知道正确的方法。

根据我的尝试,参数

durationDays
必须出现在url中,否则请求将返回
400 INVALID ARGUMENT
。即使将 DURATION 值设置为
0
-1
也会返回类似的错误。

Firebase Analytics API 文档:https://firebase.google.com/docs/reference/dynamic-links/analytics

firebase firebase-analytics firebase-dynamic-links
1个回答
0
投票

您可以尝试下载通过其 api 以编程方式生成的所有链接。在那里您可以找到一个名为“创建时间戳”的列,您可以使用它来获取日期。

可以按照 https://firebase.google.com/support/guides/export-dynamic-links

上的说明进行备份

您可以使用 Google Takeout 导出项目动态链接的元数据。为此,请按照以下步骤操作:

Ensure you are signed in to a Google Account with owner permissions on your Firebase project.
Open your Google Account's Google Takeout page.
Select the Firebase projects from which you want to export link metadata. By default, all Firebase projects you own will be selected.
If you want to export metadata from links created using one of the Firebase SDKs or the REST API, in addition to those created in the console, select the options from the Advanced menu.
Click Next step, then choose how and with which frequency you want the exported data to be delivered to you.
Click Create export.

Note that your export could take up to a day.

Your data is exported as one or more CSV files—one for each domain. Each CSV file has the following fields:

Short link
Deep link (link)
Android package name (apn)
Android fallback link (afl)
Android minimum package version code (amv)
iOS bundle ID (ibi)
iOS fallback link (ifl)
iOS custom scheme (ius)
iOS iPad fallback link (ipfl)
iOS iPad bundle ID (ipbi)
iOS app store ID (isi)
iOS minimum version (imv)
Enable forced redirect? (efr)
Desktop fallback link (ofl)
Social title (st)
Social description (sd)
Social image link (si)
UTM source (utm_source)
UTM medium (utm_medium)
UTM campaign (utm_campaign)
UTM term (utm_term)
UTM content (utm_content)
iTunes connect at
iTunes connect ct
iTunes connect mt
iTunes connect pt
Archived?
Link name
Creation timestamp
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.