Marketing Strategies for WeChat Mini Programs: Poster Generation, Search Direct, and Multi‑Platform QR Codes

This article explains how Ctrip's marketing team leverages WeChat mini‑program features—poster drawing with canvas, search‑direct navigation, and universal QR‑code routing—to create low‑cost, high‑conversion viral marketing campaigns, complete with code examples and implementation details.

Ctrip Technology
Ctrip Technology
Ctrip Technology
Marketing Strategies for WeChat Mini Programs: Poster Generation, Search Direct, and Multi‑Platform QR Codes

With the rapid adoption of mini programs in recent years, many merchants use them for marketing due to their flexibility compared to native apps, supporting scenarios such as search, chat, groups, and Moments.

Ctrip's marketing team has experimented with various viral marketing schemes within its main mini program, using activities and communities to drive user sharing, achieving daily UVs ranging from tens of thousands to over a hundred thousand and total participants up to millions.

1. Poster Generation

Since mini programs can only share cards to friends or groups, the team combines QR codes with poster images to convey key information and enable users to scan or long‑press to open the mini program. A lightweight canvas wrapper was built to handle image drawing, text rendering, and saving.

let pic = new Picture('mycanvas', 375, 635);
pic.getImgInfo(that.data.pic, function (data) {
  // background
  pic.drawImg(data.path, { left: 0, top: 0 }, { width: 375, height: 635 });
  // text
  pic.drawText(that.data.username, { size:13, color:'#fff', align:'left' }, { left:286, top:505 });
  pic.drawText(that.data.text, { size:18, color:'#fff', align:'left' }, { left:80, top:190 });
  // render
  pic.draw(function () {
    pic.canvasToImgPath(function (path) {
      that.setData({ img: path });
      that.uploadImg(path);
    });
  });
});

When drawing multi‑line text, the code dynamically adjusts line height and font size based on length.

let that = this;
let textLen = text.length;
let topHeight = textLen < 6 ? 190 : 180;
let fontBigger = true;
for (let i = 0; i < textLen; i++) {
  if (text[i].length > 13) { fontBigger = false; break; }
}
for (let i = 0; i < textLen; i++) {
  if (textLen < 6 && fontBigger) {
    pic.drawText(text[i], { size:18, color:'#' + that.data.fontcolor, align:'left' }, { left:80, top:topHeight });
    topHeight += 35;
  } else {
    pic.drawText(text[i], { size:15, color:'#' + that.data.fontcolor, align:'left' }, { left:80, top:topHeight });
    topHeight += 27;
  }
}

2. Search Direct

WeChat “Search” allows users to type keywords and receive mini‑program recommendation cards; clicking the card jumps directly to a specific page. The flow involves HTTP POST from WeChat to the developer’s server, signature verification, intent parsing, widget data generation, and client‑side rendering.

const ctx = this.getContext();
const { width, height } = options;
let wxQuery = options.query;
gWidgetData = this.getWidgetParam('widgetData', wxQuery) || {};
gQueryData = this.getWidgetParam('wxParamData', wxQuery);
if (gQueryData) { bizType = gQueryData.type || ''; }
WidgetDom.init({ windowWidth: width, windowHeight: height, classObj, ctx });
this.setWidgetRender();
this.setWidgetData();
WidgetDom.useDynamicHeight();

After the first render, the client periodically polls for updated widget data and pushes it to the mini program.

onDataPush(options) {
  gWidgetData = this.getWidgetParam('data', options);
  if (!gWidgetData) { return; }
  this.setWidgetRender();
  this.setWidgetData();
}

3. Multi‑Platform QR Codes

QR codes are a major traffic source for mini programs. By using a universal H5 link QR code that redirects to a middle page, the same code can open the appropriate mini program on WeChat, Alipay, or Baidu, falling back to an H5 page when the platform cannot be identified.

4. Summary

Mini‑program based viral growth offers low acquisition cost and high conversion because users can access functionality without installation. Combining QR codes, posters, and easy sharing dramatically reduces friction, enabling rapid user acquisition and retention.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

frontendCanvasWeChat Mini ProgramQR code
Ctrip Technology
Written by

Ctrip Technology

Official Ctrip Technology account, sharing and discussing growth.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.