根据Bing Ads用户的请求获取统计信息的建议 [英] Advice for getting stats on request for Bing Ads user

查看:61
本文介绍了根据Bing Ads用户的请求获取统计信息的建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Rails应用程序,目前使用SubmitGenerateReport / PollGenerateReport为用户提供其广告系列统计信息。


当他们设置日期范围时,(他们可能会这样做多次在整个会话中使用不同范围的时间),我使用SubmitGenerateReport向Bing API发出SOAP请求。  根据文档,我接下来PollGenerateReport并继续发出
请求,直到我收到"成功"状态为止并接收下载网址。


但是,状态通常是"等待"。浏览器超时这么久了。  即使没有,用户也会等待很长时间。


您能否告诉我如何加快速度?  我应该遵循不同的流程吗?  该页面还向Adwords API和Twilio API发出API请求,但Bing API请求占用了83%的页面加载时间(每个New Relic)。


我不能第一个使用API​​的人允许用户动态提取统计数据,所以我想我可能错过了一些明显的东西。


谢谢!

解决方案

生成报告所需的时间取决于您请求报告时请求的数据量和服务器负载。请确保您只是请求所需的列。


也就是说,BingAds无法保证在相对较短的时间内生成并返回报告。您的客户端发出单个HTTP请求。 


如果您的应用程序无法生成并缓存客户端所需的报告集,那么最佳解决方案是动态使用AJAX报告完成后更新客户端的页面。下一个最好的事情是允许你的客户在报告状态待定时进行
手动刷新。


希望这会有所帮助。


克里斯


I have a Rails app that currently utilizes the SubmitGenerateReport / PollGenerateReport to serve users their campaign stats.

When they set a date range, (they will probably do this multiple times with different ranges throughout their session), I make a SOAP request to the Bing API using SubmitGenerateReport.  Per the docs, I then PollGenerateReport and continue to make the request until I receive a status of "Success" and receive the download URL.

However, often times the status is "Pending" for so long that the browser times out.  Even if it didn't, the user would be kept waiting for a long time.

Can you offer me some insight as to how I can speed this up?  Should I be following a different process?  The page also makes API requests to the Adwords API and Twilio API but the Bing API request takes up 83% of page load time (per New Relic).

I can't be the first person utilizing the API to allow users to pull stats dynamically so I'm thinking I may have missed something obvious.

Thanks!

解决方案

The time it takes for a report to generate is a function of the amount of data you're requesting and the server load at the time you request the report. Be sure that you're only requesting the columns you need.

That said, it's not possible for BingAds to guarantee that a report will be generated and returned in the relatively short time it takes for your client to make a single HTTP request. 

If your application is unable to generate and cache the set of reports needed by your clients, then the best solution is to use AJAX to dynamically update the client's page when a report completes. The next best thing would be to allow your client to do manual refreshes while the report status is pending.

Hope this helps.

Chris


这篇关于根据Bing Ads用户的请求获取统计信息的建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆