Adparams 在 Google Adwords PHP api 中如何工作

发布于 2024-11-09 00:01:13 字数 1068 浏览 0 评论 0原文

我有 700 种产品要制作广告,每种产品都有不同的成本和制作年份,我想在我的广告中显示这些值并动态更改它们。所以我在标题和描述1中使用了adparams,如

$textAd->headline     = 'Sale!  productname {param1:2011}';
$textAd->description1 = 'For Just ${param2:25000}';

论坛中所述。我已经创建了将 adparams 设置为关键字。

$adParam1 = new AdParam($adGroupId, $keywordId, $year, 1);
$adParam2 = new AdParam($adGroupId, $keywordId, $price, 2);

// Create operations.
$adParamOperation1 = new AdParamOperation();
$adParamOperation1->operand = $adParam1;
$adParamOperation1->operator = 'SET';

$adParamOperation2 = new AdParamOperation();
$adParamOperation2->operand = $adParam2;
$adParamOperation2->operator = 'SET';

由于 adparams 与关键字以及与广告组而不是广告相关的关键字相关,因此我为每个广告创建了广告组(这样我就有 700 个广告组)。每个广告组都有一个带有相关关键字的广告。现在当我使用 api 获取广告时。

我得到类似这样的东西,

........
[ad] => TextAd Object
(
     [headline] => Sale! product {param1:2011}
     [description1] =>  Just ${param2:25000}
.........

参数字符串是这样显示的,我无法确定 adparams 是否正常工作,而且我也不相信我处于正确的路径上。请帮我做这件事。

I have 700 products to create ads each with different cost and year of make and i want to display this values in my ad and change them dynamically. so i have used adparams in the headline and in description1 as

$textAd->headline     = 'Sale!  productname {param1:2011}';
$textAd->description1 = 'For Just ${param2:25000}';

as descried in the forums. and i have created set the adparams to the keywords.

$adParam1 = new AdParam($adGroupId, $keywordId, $year, 1);
$adParam2 = new AdParam($adGroupId, $keywordId, $price, 2);

// Create operations.
$adParamOperation1 = new AdParamOperation();
$adParamOperation1->operand = $adParam1;
$adParamOperation1->operator = 'SET';

$adParamOperation2 = new AdParamOperation();
$adParamOperation2->operand = $adParam2;
$adParamOperation2->operator = 'SET';

since adparams is related to keywords and keywords related to adgroup and not ads, I have created adgroup for each ad(so that i have 700 adgroups). And each adgroup has a Ad with a related keyword. Now when i get the ads using the api.

I get something like this

........
[ad] => TextAd Object
(
     [headline] => Sale! product {param1:2011}
     [description1] =>  Just ${param2:25000}
.........

the param strings are shown as such, i could not determine whether the adparams, works correctly and also im not confident that i'm in the right path. Please help me in doing this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眉目亦如画i 2024-11-16 00:01:13

广告参数是关键字级别的,广告是基于广告组的。
如果您的 AdWords 帐户结构正确,那么这里应该不会有任何问题。

广告在编辑器和在线中看起来总是像上面的那样(使用 {param1:default} 等),但谷歌搜索上显示的实际广告将包含您在关键字上设置的参数。如果没有设置 pram,则默认为括号内的值。

根据我使用广告参数的经验,情况更加复杂,因为我们的 ppc 工作人员无法通过 Adwords 编辑器更改广告,这导致了更多问题。

另一种方法是简单地删除旧广告(从未真正删除)并在任何更改时创建新广告。

广告参数的主要好处是更改参数内容时数据收集是一致的。更改实际广告会完全删除所有历史数据。

希望有帮助。

Ad params are keyword level, and adverts are adgroups based.
If your Adwords account is structure correctly, there shouldn't Be any issues here.

The advert will always look like it does above (with {param1:default} etc) in editor and online, but the actual advert displayed on google search would contain the params you set on the keyword. If no pram is set, it would default to the value inside the bracket.

From my experience of using ad params, it was more complicated as our ppc staff couldn't change adverts through Adwords editor which caused more issues.

Another method, is to simply delete old adverts (which are never really deleted) and create new ones on any change.

The main benefit of ad params, is the data collection is consistent when changing the content of the params. Where as changing the actual adverts completely removes all historic data.

Hope that helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文