Quảng cáo hiển thị đã tải lên là một công cụ quan trọng trong Google Ads, cho phép bạn tải hình ảnh của riêng mình để hiển thị trên mạng hiển thị của Google. Đây là một cách hiệu quả để doanh nghiệp tạo dấu ấn cá nhân và tối ưu hóa nội dung quảng cáo của mình. Bài viết này sẽ hướng dẫn bạn cách tạo quảng cáo hiển thị đã tải lên, cùng những lưu ý cần thiết để đảm bảo hiệu quả chiến dịch.
Quảng cáo hiển thị đã tải lên cho phép nhà quảng cáo sử dụng hình ảnh tùy chỉnh của riêng mình để hiển thị trên mạng hiển thị của Google. Điều này mang lại khả năng kiểm soát nội dung cao hơn và giúp quảng cáo phù hợp với thương hiệu của doanh nghiệp.
Tuy nhiên, quảng cáo hiển thị đã tải lên cần tuân thủ các yêu cầu kỹ thuật nhất định để đảm bảo hiển thị đúng cách và đạt hiệu quả tốt nhất. Để biết thêm chi tiết về các yêu cầu đối với mẫu quảng cáo, hãy tham khảo hướng dẫn chi tiết trong bài viết liên quan.
Dưới đây là ví dụ về cách tạo quảng cáo hiển thị hình ảnh được tải lên cơ bản:
// thêm quảng cáo hiển thị tải lên vào nhóm quảng cáo được chỉ định. để lấy danh sách nhóm quảng cáo, hãy chạy getadgroups.java. public class adddisplayuploadad { private static final string bundle_url = “https://gaagl.page.link/ib87”; private static class adddisplayuploadadparams extends codesampleparams { @parameter(names = argumentnames.customer_id, required = true) private long customerid; @parameter(names = argumentnames.ad_group_id, required = true) private long adgroupid; } public static void main(string[] args) throws ioexception { adddisplayuploadadparams params = new adddisplayuploadadparams(); if (!params.parsearguments(args)) { // truyền các tham số cần thiết cho ví dụ này qua dòng lệnh hoặc chèn trực tiếp vào mã nguồn. tham khảo định nghĩa lớp tham số ở trên để xem mô tả. params.customerid = long.parselong(“insert_customer_id_here”); params.adgroupid = long.parselong(“insert_ad_group_id_here”); } googleadsclient googleadsclient = null; try { googleadsclient = googleadsclient.newbuilder().frompropertiesfile().build(); } catch (filenotfoundexception fnfe) { system.err.printf(“không thể tải cấu hình googleadsclient từ tệp. ngoại lệ: %s%n”, fnfe); system.exit(1); } catch (ioexception ioe) { system.err.printf(“không thể tạo googleadsclient. ngoại lệ: %s%n”, ioe); system.exit(1); } try { new adddisplayuploadad().runexample(googleadsclient, params.customerid, params.adgroupid); } catch (googleadsexception gae) { system.err.printf(“yêu cầu id %s thất bại do googleadsexception. lỗi cơ bản:%n”, gae.getrequestid()); int i = 0; for (googleadserror googleadserror : gae.getgoogleadsfailure().geterrorslist()) { system.err.printf(“lỗi %d: %s%n”, i++, googleadserror); } system.exit(1); } } private void runexample(googleadsclient googleadsclient, long customerid, long adgroupid) throws ioexception { // tạo tài sản gói phương tiện và trả về tên tài nguyên string adassetresourcename = createmediabundleasset(googleadsclient, customerid); // tạo quảng cáo hiển thị tải lên và liên kết với nhóm quảng cáo chỉ định createdisplayuploadadgroupad(googleadsclient, customerid, adgroupid, adassetresourcename); } private string createmediabundleasset(googleadsclient googleadsclient, long customerid) throws ioexception { // tệp zip html5 chứa các thành phần html, css và hình ảnh cần thiết cho quảng cáo. byte[] html5zip = bytestreams.tobytearray(new url(bundle_url).openstream()); asset asset = asset.newbuilder() .setname(“ad media bundle”) .settype(assettype.media_bundle) .setmediabundleasset(mediabundleasset.newbuilder().setdata(bytestring.copyfrom(html5zip)).build()) .build(); assetoperation operation = assetoperation.newbuilder().setcreate(asset).build(); try (assetserviceclient assetserviceclient = googleadsclient.getlatestversion().createassetserviceclient()) { mutateassetsresponse response = assetserviceclient.mutateassets(long.tostring(customerid), immutablelist.of(operation)); string uploadedassetresourcename = response.getresults(0).getresourcename(); system.out.printf(“tải lên gói phương tiện với tên tài nguyên: ‘%s’.%n”, uploadedassetresourcename); return uploadedassetresourcename; } } private void createdisplayuploadadgroupad(googleadsclient googleadsclient, long customerid, long adgroupid, string adassetresourcename) { ad displayuploadad = ad.newbuilder() .setname(“ad for html5”) .addfinalurls(“http://example.com/html5”) .setdisplayuploadad( displayuploadadinfo.newbuilder() .setdisplayuploadproducttype(displayuploadproducttype.html5_upload_ad) .setmediabundle(admediabundleasset.newbuilder().setasset(adassetresourcename).build()) .build()) .build(); adgroupad adgroupad = adgroupad.newbuilder() .setad(displayuploadad) .setstatus(adgroupadstatus.paused) .setadgroup(resourcenames.adgroup(customerid, adgroupid)) .build(); adgroupadoperation operation = adgroupadoperation.newbuilder().setcreate(adgroupad).build(); try (adgroupadserviceclient adgroupadserviceclient = googleadsclient.getlatestversion().createadgroupadserviceclient()) { mutateadgroupadsresponse response = adgroupadserviceclient.mutateadgroupads(long.tostring(customerid), immutablelist.of(operation)); system.out.printf(“tạo quảng cáo nhóm mới với tên tài nguyên: ‘%s’.%n”, response.getresults(0).getresourcename()); } } }
Tạo quảng cáo hiển thị đã tải lên không chỉ giúp bạn kiểm soát tốt hơn nội dung quảng cáo mà còn mang lại khả năng tùy chỉnh cao hơn, giúp quảng cáo nổi bật trên mạng hiển thị của Google. Bằng cách nắm vững các bước thực hiện và tuân thủ các yêu cầu kỹ thuật, bạn sẽ tối ưu hóa hiệu quả của chiến dịch và thu hút nhiều khách hàng tiềm năng hơn. Hãy bắt đầu triển khai quảng cáo hiển thị đã tải lên ngay hôm nay để tối đa hóa lợi ích mà Google Ads mang lại cho doanh nghiệp của bạn.
