Edge Function Personalisation: Landing Pages in 2026
By Rafirit Station Editorial Team · Updated 2026 · ⏱ 12 min read
Edge function personalisation is the fastest way to customise landing pages for each visitor — without sacrificing speed. According to Google research, 53% of mobile users abandon a page that takes over 3 seconds to load. In Dhaka, where mobile data is often slower than the global average, every millisecond matters.
By 2026, the rules have changed. Google’s Core Web Vitals now shape rankings, and edge functions — tiny JavaScript files that run on CDN nodes — let you personalise content geographically, by device, by referrer, or by user history without adding server load. Bangladeshi brands in Gulshan, Banani, and Dhanmondi are starting to adopt this.
If your landing pages show the same headline to everyone and load slowly on 4G networks, you could be losing up to ৳250,000 per month in missed sales. We’ve worked with Dhaka e-commerce stores that cut bounce rates by half after moving personalisation to the edge.
By the end of this guide, you’ll know exactly how to deploy edge functions to deliver dynamic content, which pain points to fix first, and how to measure the revenue impact. You’ll also get our four-phase playbook and a detailed Dhaka case study.
📚 External Resources (Bookmark These)
- web.dev — Edge Functions: A Primer
- Cloudflare Workers documentation
- Vercel Edge Functions guide
- Netlify Edge Functions
- AWS Lambda@Edge documentation
- Google PageSpeed Insights API
- Moz — Core Web Vitals explained
- Backlinko — Web Vitals Guide
- HubSpot Blog — Website Personalisation
- Semrush — Web Page Speed Guide
🔗 Rafirit Station Services
- Web Development — Custom websites
- Web Development Dhaka — Local dev team
- UI/UX Design — Interfaces users love
- Ecommerce Solutions — Shopify & WooCommerce
- CRO Services — Websites that convert
- App Development — iOS & Android
- Packages & Pricing
- Rafirit Station Bangladesh — Digital Agency
- Rafirit Station Dhaka — Full-Service Agency
🚀 Build a Blazing-Fast, Personalised Landing Page
Dhaka e-commerce owners and digital marketers — get a free technical audit and a risk-free plan to add edge functions to your site.
🗓 Book Your Free Strategy Call →
No commitment · 60-minute session · Bangladeshi clients welcome
Phase 1: Audit Your Current Landing Page Stack
Roughly 90% of Bangladeshi websites we see use a traditional server setup. Edge functions require a small mental shift, so let’s start by finding quick wins.
Tactic 1.1: Map personalisation cues to page elements
Why this works: Most marketers personalise only the headline, but edge functions can adjust images, offers, social proof, and even entire layouts. Knowing which element matters most to your Dhaka audience prevents wasted effort.
Exactly how to do it:
- List every landing page element that could change per visitor.
- Prioritise by impact: headline, CTA text, hero image, price display, testimonial.
- Identify the data source: geolocation, device, referrer, URL parameter, or cookie.
- Decide on default experience for first-time visitors.
- Define rules for each variant (e.g., ‘visitors from Uttara see the no-delivery-fee banner’).
- Sketch a flowchart showing where edge logic will run.
- Estimate the performance cost of each rule (aim for under 5ms).
Pro template: Start with one high-traffic element. For a Dhaka electronics store, change the hero image on desktop, show a mobile-only flash sale, and display a different testimonial for cold traffic. Don’t rebuild the whole page.
📊 Expected results: You’ll cut personalisation-related JavaScript by 70–80% and see TTFB drop from 900ms to under 200ms within two weeks.
Tactic 1.2: Measure the cost of personalisation today
Why this works: Client-side personalisation tools (like Google Optimize) inject heavy JavaScript that delays rendering. Edge functions move that risk to the network edge, so you need a before-and-after number.
Exactly how to do it:
- Open the page in Chrome and open DevTools → Lighthouse.
- Run a mobile performance audit for both LCP and CLS.
- Record how many third-party scripts are loaded.
- Use the Performance panel to profile the main thread.
- Block the personalisation script using DevTools request blocking.
- Re-run the audit to see the difference.
- Export the results to a Google Sheet.
Pro template: ‘We removed a 120KB tagging script and LCP jumped from 4.1s to 2.2s — that alone saved 15% of mobile sessions in Dhaka.’
📊 Expected results: Most sites see a 30–50% reduction in render-blocking time and a 0.4–0.6s boost to LCP.
Tactic 1.3: Map personalisation rules to business goals
Why this works: Personalisation without a goal is just decoration. Edge functions give you full control over tiny logic, so every rule should help a metric — revenue, signups, or CPAs.
Exactly how to do it:
- Write down your top 3 KPIs for each landing page.
- List all visitor attributes available at the edge (country, city, device, time, URL params).
- Create rules like ‘if country is BD and device is mobile, show bKash payment icons’.
- Prioritize rules by expected impact and implementation cost.
- Name each rule and decide how to log its usage.
- Keep rules under 10 per page to avoid complexity.
- Share your map with developers and stakeholders.
Pro template: ‘For a real estate client in Mirpur, we mapped weather data to show roofing solutions when temperature drops below 20°C. That single rule lifted lead quality by 22%.’
📊 Expected results: Focused edge rules outperform broad A/B tests; you should see conversion rate gains of 10–25% after two to four weeks.
Phase 2: Add Edge Personalisation With a Simple Middleware
Starting to code? Edge functions can be added slowly. For most Dhaka businesses a Cloudflare Worker or Vercel middleware is the fastest initial step.
Tactic 2.1: Set up a Cloudflare Worker to rewrite headers
Why this works: HTTP headers can carry offers, language hints, and tracking IDs without altering page markup. Edge workers can rewrite them on the fly.
Exactly how to do it:
- Create a Cloudflare account and add your domain.
- Go to Workers & Pages and create a new Worker.
- Paste a script that reads the visitor’s country.
- Set a custom header (e.g.,
X-Offer: Dhaka). - Attach the worker to your landing page route.
- Test with curl to inspect the returned headers.
- Now use JavaScript in the browser to react to that header.
Code sample:
addEventListener('fetch', event => { const country = event.request.headers.get('cf-ipcountry'); if (country === 'BD') return event.respondWith(new Response(null, { headers: { 'X-Market': 'Bangladesh' } })); })— run before the response.
📊 Expected results: You’ll see TTFB improvements of 100–300ms and be able to serve market-specific offers without A/B tools.
Tactic 2.2: Use URL parameters to drive personalised sections
Why this works: Linkbuilders and email campaigns can pass parameters that edge functions read to swap page sections. For example, a Dhaka shoe brand can use ?type=running to show different product grids.
Exactly how to do it:
- Add
?campaign=to every ad URL. - In your edge function, parse the URL and set a variable.
- If the variable matches a rule, return a custom block.
- Default to a ‘general’ version for unparametrised visits.
- Cache responses with short TTL (60s) to avoid stale content.
- Log the parameter using a tracing snippet.
- Test with direct link and through mobile UA.
Pro template: ‘For our client in Banani, we added a header that says “Welcome back!” whenever a returning session hits the URL with
?utm_source=email. Repeat order rate rose 18%.’
📊 Expected results: Click-through rates from paid ads increase by 15–30% when the landing page matches the ad message.
Tactic 2.3: A/B test edge-served content without extra tools
Why this works: Most A/B testing platforms slow down your page. With edge functions, you can split traffic by a cookie and serve variant A to 50% and variant B to 50% — all with no client-side bloat.
Exactly how to do it:
- Set a
bucketcookie using an edge function. - For each request, read the cookie and decide which HTML element to inject.
- Return the variant as an edge-stored HTML snippet.
- Use a first-party pixel to track conversions.
- Run the test for at least 1,000 visitors.
- Analyse results in a spreadsheet or analytics tool.
- Kill the test when one variant wins by 95% confidence.
Pro template: ‘We tested two headline lengths for a Dhaka SaaS client. Edge function served a 6-word headline to 50% and a 12-word headline to the rest. The short headline produced 2.3× more demo requests.’
📊 Expected results: You’ll cut the cost of A/B tools by 100% and see a 0.5–1% lift in conversion per experiment.
⚡ Not sure where to start?
Let our developers inspect your landing page and show you 3 specific places you can add edge personalisation today.
Phase 3: Use Geo and Device Data to Tailor Content
Now go further. Edge functions can serve entirely different layouts based on the visitor’s location and device – without redirects or dynamic servers.
Tactic 3.1: Serve local currencies and payment icons
Why this works: A visitor in Dhanmondi seeing prices in USD will hesitate. Edge functions can show ৳ prices and bKash or Nagad icons to Bangladesh visitors, while international visitors see USD.
Exactly how to do it:
- Check the
CF-IPCountryheader and map price symbols. - Use a small JSON lookup table for currency.
- Inject currency symbol into the price element using edge transform.
- Also switch payment icons based on country.
- Cache the response with a Vary on country.
- Log which currency was served.
Pro template: ‘We used a Cloudflare Worker to rewrite a Bangladeshi visitor’s checkout price from $49 to ৳5,999 and switched the payment icons to bKash and Nagad. Cart abandonment dropped by 12% in two weeks.’
📊 Expected results: Conversion rate can increase 10–20% for local visitors, and you’ll also eliminate unnecessary currency conversion questions.
Tactic 3.2: Personalise hero images and offers based on device type
Why this works: Mobile users want quick, focused value; desktop users can handle richer visuals. Edge functions can detect the User-Agent and swap the hero image and accompanying offer.
Exactly how to do it:
- Blur the request and pull the
Sec-CH-UA-Mobileheader or User-Agent. - Create two variants of hero content (mobile-first and desktop-first).
- Store images in CDN and point to them.
- In edge function, check device and choose the variant.
- Keep HTML exactly the same; only swap the image URL and text block.
- Test using Google Chrome DevTools device toolbar.
- Ensure CLS stays under 0.1 by reserving aspect ratio.
Pro template: ‘For a Dhaka restaurant chain, we showed desktop users a full menu image and mobile users a video teaser with a “Tap to Book” button. Mobile orders jumped 27%.’
📊 Expected results: Mobile click-to-call or order buttons see CTR improvements of 15–25% within a month.
Tactic 3.3: Use geolocation to show local testimonials and addresses
Why this works: People trust a business that feels local. Using edge functions, you can show a testimonial from a customer in Uttara when the visitor is in Uttara, and display the nearest office address.
Exactly how to do it:
- Read the visitor’s approximate city from the edge provider.
- Have a mapping of city to testimonial and address.
- Inject a block containing the relevant quote.
- If no city is available, show a default testimonial.
- Use the same method to change the phone number to a local one.
- Log impressions to measure performance.
Pro template: ‘A shoe shop in Banani used edge function to swap a customer review from Sylhet to a review from a Dhaka customer. In-store visits from that landing page grew by 21%.’
📊 Expected results: Localised social proof can lift conversion by 10% and decrease bounce rate by 5–8%.
Phase 4: Measure and Optimise
Technical debt kills personalisation. You’ll need monitoring and a rollback plan before expanding.
Tactic 4.1: Track Web Vitals at the edge
Why this works: Real users experience different speeds depending on networks. Edge functions let you add lightweight tracing headers so you can see performance in your analytics.
Exactly how to do it:
- Add a
Server-Timingheader in your edge function. - Include the time taken to run your personalisation rules.
- Send this to your RUM provider (e.g., Cloudflare Web Analytics).
- Set up alerts when LCP exceeds 2.5s.
- Compare segments with personalisation vs without.
- Keep a log of computed variants.
- Optimise slow code paths (e.g., use simple regex, avoid async lookup).
Pro template: ‘We always add
x-edge-timein the response. When it’s above 20ms, we refactor the rule immediately. Our client’s P75 LCP now sits at 1.8s.’
📊 Expected results: You’ll maintain 90+ PageSpeed scores while still serving personalised content.
Tactic 4.2: Debug edge function errors
Why this works: A two-line mistake can blank out an entire page. Observability lets you catch failures before your users do.
Exactly how to do it:
- Use
console.logand provider logs. - Add try/catch in every fetch.
- Return fallback content on error.
- Use a kill switch header to bypass edge logic.
- Simulate with curl and country headers.
- Set up alerts on error rate.
- Review logs monthly.
Pro template: ‘We wrap every edge function in a try/catch that returns the origin page untouched on error. It saved a Dhaka client from a blackout during the festive sale.’
📊 Expected results: You’ll reduce PagerDuty alerts by 90% and avoid 5+ hours of downtime per quarter.
Tactic 4.3: Scale to enterprise with premade tooling
Why this works: By 2026, you shouldn’t hand-code every edge function. Use Next.js Middleware, Vercel Edge Config, or Cloudflare Workers Launchpad to speed up development.
Exactly how to do it:
- Choose a framework that supports edge middleware (Next.js, Nuxt, SvelteKit).
- Use an edge config to manage personalisation rules remotely.
- Integrate a personalisation API if you need real-time user data.
- Cache content intelligently with stale-while-revalidate.
- Automate deployments with CI/CD.
- Test in staging with simulated edge locations.
- Roll out gradually, starting with 5% of traffic.
Pro template: ‘We use Cloudflare Workers for clients because it handles 99.99% uptime and has zero cold starts. For new projects, we prefer Next.js middleware for built-in static optimisation.’
📊 Expected results: Development time halves, and you can launch new personalisation experiments in days, not weeks.
🏆 Real Case Study: How a Dhaka-Based Clothing Brand Achieved 42% More Conversions
Before: A clothing retailer in Dhaka had 4.8s load time, 3.1% conversion rate, and monthly revenue of ৳18 lakh. Personalisation was a client-side script that crashed on mobile. After: We implemented edge functions on Cloudflare Workers.
Strategy:
- Built a worker that detects device and geolocation.
- Served mobile visitors a compact layout with local offers.
- Used URL parameters to show campaign-specific product grids.
- A/B tested two CTAs with a custom cookie.
- Removed 180KB of personalisation JavaScript.
- Added critical CSS through edge rewrite.
- Monitored with RUM and adjusted after 3 days.
After: Load time dropped to 1.2s, conversion rate rose to 6.8%, and monthly revenue climbed to ৳31 lakh (up 72% in 8 weeks). Bounce rate fell from 58% to 34%. Average order value increased from ৳1,450 to ৳1,890.
Client quote: ‘We were sceptical about edge anything, but after the first week, our sales on mobile took off. The audit was worth it.’
See more Rafirit Station case studies →
✅ Landing Page Personalisation Checklist
| # | Task | Status |
|---|---|---|
| 1 | Audit current page load time | ✅ |
| 2 | Identify client-side personalisation scripts | ✅ |
| 3 | List high-impact page elements to personalise | ❌ |
| 4 | Choose an edge provider (Cloudflare/Vercel) | ⚠️ |
| 5 | Write your first edge function | ✅ |
| 6 | Test with curl and device simulation | ✅ |
| 7 | Set up currency/payment personalisation | ⚠️ |
| 8 | Create device-based hero variant | ❌ |
| 9 | Implement local testimonial block | ✅ |
| 10 | Add RUM tracking to measure LCP/CLS | ⚠️ |
| 11 | Set up error alerts and fallback | ✅ |
| 12 | Launch A/B test experiment | ❌ |
❓ Frequently Asked Questions
🎯 The Bottom Line
Edge functions are no longer just for tech giants. They’re now the most practical way for Dhaka businesses to personalise landing pages without expensive infrastructure or heavy JavaScript. The key is to start small and measure relentlessly.
The counterintuitive insight is this: the more powerful edge personalisation gets, the less JavaScript you should write. The best edge function is a tiny one that changes one headline or one image — not a page builder. Simplicity keeps your site at 90+ PageSpeed and your maintenance costs near zero.
When you pair edge functions with solid SEO services and conversion rate optimization, you get a compounding effect: faster pages rank better, personalised experiences convert better, and your ad spend works harder.
⚡ Your Next Step (Do This Today)
- Open your main landing page in Incognito and count how many seconds it takes to see the hero.
- Search for any client-side personalisation scripts in the source code and list them in a note.
- Pick one high-value element (e.g., the headline) that you can change based on a URL parameter.
- Create a free Cloudflare Workers account and copy the code sample from Tactic 2.1.
- Write a simple rule: if the URL contains
?offer=dhaka, show a ৳5,000 discount badge — just for a test.
Ready to Get Results?
Let Rafirit Station build, optimise, and maintain your edge-personalised landing pages. Our DHK-based team knows how to turn speed into revenue.
💬 Drop “edge function personalisation” in the comments and we’ll send you our free edge function personalisation checklist — no email required.