Prev | Current Page 379 | Next

David Berube

"Practical Reporting with Ruby and Rails"

rhtml.
Listing 13-6 shows the second view, which contains the actual report.
Listing 13-6. Report Display Page (app/views/budget_optimizer/report.rhtml)

Google AdWords Campaign Plan


<%unless @excel_view %>

<%=link_to '[download as excel]',
:params=>{
'view_as_excel'=>true,
'target_clicks'=>@target_clicks
CHAPTER 13 n TRACKING YOUR ADS WITH GOOGLE ADWORDS 275
}
%>


<%end%>






<%@results.each do |r| %>





<%end%>
Ad HeadlineAvg ClicksCost Per Click
<%=r.headline%> <%=r.clicks%> clicks <%=format_google_currency(r.cost/r.clicks) %>

Summary















Goal Clicks<%=@target_clicks%>
Estimated Available Clicks<%=@estimated_clicks%>
Estimated Cost Per Click (CPC)<%=format_google_currency(@avg_cost_per_click )%>

Save this view as app/views/budget_optimizer/report.rhtml.
You can run this example by using the following command:
ruby script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.


Pages:
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391
tani nocleg Wizytówki Babia Góra Hotele SPA Jastrzębia Góra katalog stron budowlanych perfumy fm